added "nowho" parameter to debug userlist and fixed memory leak in DBHelper.c
[NeonServV5.git] / src / cmd_funcmds.c
index ad0758c683e83b0998c4669f206c7da8b84130ab..3f4095ad6f45c4cf0410ec371dcfb4ed23e87231 100644 (file)
@@ -1,5 +1,5 @@
 /* cmd_funcmds.c - NeonServ v5.3
- * Copyright (C) 2011  Philipp Kreil (pk910)
+ * 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
@@ -199,8 +199,10 @@ CMD_BIND(funcmd_8ball) {
 CMD_BIND(funcmd_cookie) {
     FUNCMD_HEADER;
     if(argc) {
-        if(!(user = getUserByNick(argv[0])))
+        if(!(user = getUserByNick(argv[0]))) {
             reply(current_funcmd.client, current_funcmd.user, "NS_USER_UNKNOWN", argv[0]);
+            return;
+        }
     }
     char *tmp;
     int user_count = ((tmp = getSetting(user, chan, "cookies")) ? atoi(tmp) : 0);