added structure for future fun-commands
[NeonServV5.git] / src / modcmd.c
index bfefb4bdca33f4c82a320dfc029806c3fb32fb54..8b9c72c4573ab60000075d2e6a14e20df36861f9 100644 (file)
@@ -153,6 +153,11 @@ static void handle_command(struct ClientSocket *client, struct UserNode *user, s
     struct cmd_binding *cbind;
     for(cbind = cmd_binds[bind_index]; cbind; cbind = cbind->next) {
         if(cbind->botid == client->botid && stricmp(cbind->cmd, message) == 0) {
+            if((cbind->flags & CMDFLAG_FUNCMD)) {
+                if(!sent_chan)
+                    break;
+                chan = sent_chan;
+            }
             //get a text bot
             tmp_text_client = get_prefered_bot(client->botid);
             //parse the arguments...
@@ -768,7 +773,7 @@ void bind_unbound_required_functions(int botid) {
     }
 }
 
-void register_bot_alias(int botid, char *alias) {
+void register_command_alias(int botid, char *alias) {
     struct cmd_bot_alias *botalias;
     for(botalias = bot_aliases; botalias; botalias = botalias->next) {
         if(!stricmp(botalias->alias, alias))