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;
}