added cmd_bind & cmd_unbind
[NeonServV5.git] / modcmd.c
index 31ea320607b2101863338366def9d2653a196e6a..7b5f65ec99d2ec519cf7125c973ecbfe9c140aff 100644 (file)
--- a/modcmd.c
+++ b/modcmd.c
@@ -521,6 +521,15 @@ int unbind_cmd(int botid, char *cmd) {
     return 0;
 }
 
+struct cmd_function *find_cmd_function(int botid, char *name) {
+    struct cmd_function *cmdfunc;
+    for(cmdfunc = cmd_functions; cmdfunc; cmdfunc = cmdfunc->next) {
+        if(cmdfunc->botid == botid && stricmp(cmdfunc->name, name) == 0)
+            break;
+    }
+    return cmdfunc;
+}
+
 struct ClientSocket *getTextBot() {
     return tmp_text_client;
 }