]> jfr.im git - irc/evilnet/x3.git/blobdiff - src/nickserv.c
Added some bits from check_ctcp into the mark version handling
[irc/evilnet/x3.git] / src / nickserv.c
index f5b8fdd136f1e69c118b29d6d44dda9cc89027a6..63ef9d638ab6c19b2a65cbc0c9660d4b6300e1f4 100644 (file)
@@ -5,7 +5,7 @@
  *
  * x3 is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation; either version 3 of the License, or
  * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
@@ -1062,10 +1062,10 @@ nickserv_register(struct userNode *user, struct userNode *settee, const char *ha
        return 0;
     }
 
-    if(strlen(handle) > 15)
+    if(strlen(handle) > 30)
     {  
         if(user)
-          send_message(user, nickserv, "NSMSG_HANDLE_TOLONG", handle, 15);
+          send_message(user, nickserv, "NSMSG_HANDLE_TOLONG", handle, 30);
         return 0;
     }
 
@@ -1874,9 +1874,9 @@ static NICKSERV_FUNC(cmd_rename_handle)
         reply("NSMSG_HANDLE_EXISTS", argv[2]);
         return 0;
     }
-    if(strlen(argv[2]) > 15)
+    if(strlen(argv[2]) > 30)
     {
-        reply("NMSG_HANDLE_TOLONG", argv[2], 15);
+        reply("NMSG_HANDLE_TOLONG", argv[2], 30);
         return 0;
     }
 #ifdef WITH_LDAP
@@ -1959,6 +1959,10 @@ struct handle_info *loc_auth(char *handle, char *password)
     }
 //    else           
 #else
+    if (!hi) {
+        return NULL;
+    }
+
     if (!checkpass(password, hi->passwd)) {
         return NULL;
     }