removed unused code in bots.c
[NeonServV5.git] / src / ModeNode.c
index 438a51616677e44229b2bebc0b0669911bedf7f8..8cc5b67a07328f6f055060bc2f5105f5b009a9db 100644 (file)
@@ -1,5 +1,5 @@
-/* ModeNode.c - NeonServ v5.3
- * Copyright (C) 2011  Philipp Kreil (pk910)
+/* ModeNode.c - NeonServ v5.6
+ * 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
@@ -284,7 +284,7 @@ int parseMode(struct ModeNode* modes, int add, char mode, char *param) {
         modes->modes &= ~modeOpt[0];
         modes->allmodes |= modeOpt[0];
         if(MODE_TYPE == CHANNEL_MODE_TYPE_B) {
-            if(!param) return 0;
+            if(!param && !(modeOpt[2] & CHANNEL_MODE_KEY)) return 0;
             if(MODE_VALUE == CHANNEL_MODE_VALUE_STRING) {
                 free(modes->mode_str_args[MODE_VALUE_INDEX]);
                 modes->mode_str_args[MODE_VALUE_INDEX] = NULL;