]> jfr.im git - irc/quakenet/newserv.git/blobdiff - newsearch/ns-channel.c
sync http://hg.quakenet.org/snircd/diff/6a655306abe8/ircd/ircd_string.c
[irc/quakenet/newserv.git] / newsearch / ns-channel.c
index 884ff6a32e0c7d964d6ca4f06d0523b24533b2c8..3a79920f309e0fbdfb011d4438a13d7f65f867da 100644 (file)
@@ -13,15 +13,21 @@ void *channel_exe(searchCtx *ctx, struct searchNode *thenode, void *theinput);
 void channel_free(searchCtx *ctx, struct searchNode *thenode);
 
 struct searchNode *channel_parse(searchCtx *ctx, int argc, char **argv) {
-  struct searchNode *thenode;
+  struct searchNode *thenode, *convsn;
   channel *cp;
-
+  char *p;
+  
   if (argc<1) {
     parseError = "channel: usage: channel <channel name>";
     return NULL;
   }
 
-  if (!(cp=findchannel(argv[0]))) {
+  if (!(convsn=argtoconststr("channel", ctx, argv[0], &p)))
+    return NULL;
+
+  cp=findchannel(p);
+  convsn->free(ctx, convsn);
+  if (!cp) {
     parseError = "channel: unknown channel";
     return NULL;
   }