]> jfr.im git - z_archive/Ophion.git/commitdiff
Cache.hookcmd() prototype changes master
authorJohn Runyon <redacted>
Tue, 2 Apr 2013 10:18:57 +0000 (06:18 -0400)
committerJohn Runyon <redacted>
Tue, 2 Apr 2013 10:18:57 +0000 (06:18 -0400)
classes.py
modules/sample.py

index 1290bb679b087262d4677cb1fc1dad467e389810..db6cc305a0b84b50eacbfcf7d9bcf22532335917 100644 (file)
@@ -238,7 +238,7 @@ class Cache:
                except: return False
                else: return True
 
-       def hookcmd(self, cmd, level, func, params, helpfunc, isadmin=False, reqchan=True):
+       def hookcmd(self, cmdname, level, cmdcallback, minparams, helpcallback, isadmin=False, reqchan=True):
                self.cmds[cmd.upper()] = {'module': cache.currmod, 'func': func, 'level': level, 'params': params, 'helpfunc': helpfunc, 'isadmin': isadmin, 'reqchan': reqchan}
        def unhookcmd(self, cmd):
                try: del self.cmds[cmd]
index dd43f2b07e7072ff5f3e6017f0d4d4f2c8e63313..f9dad6796ea3af5415e3e808e9e942b3fc497c87 100644 (file)
@@ -6,7 +6,7 @@ author = 'John Runyon'
 version = '1'
 def init(cache):
        cache.currmod = __name__
-#cache.hookcmd('COMMAND',level,cmdfn,params,helpfn,isadmin=False,reqchan=True)
+#cache.hookcmd(str cmdname, int level, func cmdcallback, int minparams, func helpcallback, bool isadmin=False, bool reqchan=True
        cache.hookcmd('FOO', 0, foo, 0, helpfoo)
        cache.hookcmd('BAR', 1, bar, 0, helpbar, isadmin=True)
        cache.hookcmd('BAZ', 0, baz, 0, helpbaz, reqchan=False)