Another year is about to end... So we have to update these damn copyright information :P
[NeonServV5.git] / src / cmd_global_commands.c
index e0cfba056a836031ccb7bbc1f21252ca19ffd804..426be8b8ddd509821b4ddbc61cbd7267c7d0116a 100644 (file)
@@ -1,5 +1,5 @@
-/* cmd_global_commands.c - NeonServ v5.2
- * Copyright (C) 2011  Philipp Kreil (pk910)
+/* cmd_global_commands.c - NeonServ v5.3
+ * Copyright (C) 2011-2012  Philipp Kreil (pk910)
  * 
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -29,13 +29,13 @@ CMD_BIND(global_cmd_commands) {
     struct cmd_binding *cbind;
     int bindcount = 0;
     for(cbind = getAllBinds(NULL); cbind; cbind = getAllBinds(cbind)) {
-        if(cbind->botid == client->botid && !(cbind->func->flags & CMDFLAG_FUNCMD))
+        if(cbind->botid == client->botid && (cbind->botid || cbind->clientid == client->clientid) && !(cbind->func->flags & CMDFLAG_FUNCMD))
             bindcount++;
     }
     struct cmd_binding *binds[bindcount];
     bindcount = 0;
     for(cbind = getAllBinds(NULL); cbind; cbind = getAllBinds(cbind)) {
-        if(cbind->botid == client->botid && !(cbind->func->flags & CMDFLAG_FUNCMD))
+        if(cbind->botid == client->botid && (cbind->botid || cbind->clientid == client->clientid) && !(cbind->func->flags & CMDFLAG_FUNCMD))
             binds[bindcount++] = cbind;
     }
     qsort(binds, bindcount, sizeof(struct cmd_binding *), global_cmd_commands_sort);