]> jfr.im git - erebus.git/blobdiff - modules/foo.py
minor bugfix and convenience function lib.mod(modname) in modlib
[erebus.git] / modules / foo.py
index fbcb38c3003b35dbb2694cc67692ff1862e1a85c..9dbf29f7e5327b5a1edbb74576665c6e39f77e22 100644 (file)
@@ -1,10 +1,10 @@
-# Erebus IRC bot - Author: John Runyon
+# Erebus IRC bot - Author: Erebus Team
 # simple module example
 # This file is released into the public domain; see http://unlicense.org/
 
 # module info
 modinfo = {
-       'author': 'John Runyon (DimeCadmium)',
+       'author': 'Erebus Team',
        'license': 'public domain',
        'compatible': [1], # compatible module API versions
        'depends': [], # other modules required to work properly?
@@ -19,9 +19,7 @@ modstop = lib.modstop
 # module code
 @lib.hook('test', needchan=False)
 def cmd_gtest(bot, user, chan, realtarget, *args):
-       print type(chan), repr(chan), str(chan)
-
-       if chan is not None: replyto = chan
+       if realtarget == chan.name: replyto = chan
        else: replyto = user
 
        bot.msg(replyto, "You said: %s" % (' '.join([str(arg) for arg in args])))