fixed small unbind problem with these temporarily added commands
[NeonServV5.git] / src / modcmd.c
index 90e46e069354775aea37408db06757ebd1e21a29..3f480cda6b8fcac491f15397f4e84f0d632a206a 100644 (file)
@@ -718,8 +718,9 @@ void bind_unbound_required_functions(int botid) {
                 if(found)
                     break;
             }
-            if(!found) {
-                bind_cmd_to_function(botid, cmdfunc->name, cmdfunc);
+            if(!found && bind_cmd_to_function(botid, cmdfunc->name, cmdfunc)) {
+                cbind = find_cmd_binding(botid, cmdfunc->name);
+                cbind->flags |= CMDFLAG_TEMPONARY_BIND;
             }
         }
     }