X-Git-Url: https://jfr.im/git/irc/evilnet/x3.git/blobdiff_plain/684c56b9f170c98af3da15fbde1363dc1434ead5..fa3c07bbce89332ed1f96313aad55bbea81f9718:/src/nickserv.c diff --git a/src/nickserv.c b/src/nickserv.c index f5b8fdd..63ef9d6 100644 --- a/src/nickserv.c +++ b/src/nickserv.c @@ -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; }