modstop = lib.modstop
# module code
-import ctlmod
+@lib.hook('test', needchan=False)
+def cmd_gtest(bot, user, chan, realtarget, *args):
+ if chan is not None: replyto = chan
+ else: replyto = user
-@lib.hook('test')
-def cmd_test(bot, user, chan, realtarget, *args):
- bot.msg(chan, "You said: !test %s" % (' '.join([str(arg) for arg in args])))
+ bot.msg(chan, "You said: %s" % (' '.join([str(arg) for arg in args])))