]> git.donarmstrong.com Git - infobot.git/commitdiff
- we now check if CODEREF exists.
authordms <dms@c11ca15a-4712-0410-83d8-924469b57eb5>
Sat, 7 Apr 2001 12:06:43 +0000 (12:06 +0000)
committerdms <dms@c11ca15a-4712-0410-83d8-924469b57eb5>
Sat, 7 Apr 2001 12:06:43 +0000 (12:06 +0000)
git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk/blootbot@432 c11ca15a-4712-0410-83d8-924469b57eb5

src/CommandStubs.pl

index 4a052a8eec787076539f12e0012cb03b41cbf556..a4c3679c315e2c49f88d9efe248a5f19c79d7a10 100644 (file)
@@ -111,7 +111,11 @@ sub parseCmdHook {
                &loadMyModule($myModules{ $hash{'Module'} });
            }
 
-           ### TODO: check if CODEREF exists.
+           # check if CODEREF exists.
+           if (!defined &{ $hash{'CODEREF'} }) {
+               &WARN("coderef $hash{'CODEREF'} don't exist.");
+               return 1;
+           }
 
            if (exists $hash{'ArrayArgs'}) {
                &{$hash{'CODEREF'}}(@args);