+
+@lib.hook(needchan=False, wantchan=True)
+@lib.help(None, 'a command which will consume a channel if given')
+def wantchan(bot, user, chan, realtarget, *args):
+ if chan is not None:
+ bot.msg(user, "Channel provided: %s" % (chan))
+ else:
+ bot.msg(user, "No channel provided")