1
0
mirror of https://github.com/anope/anope.git synced 2026-07-02 20:03:12 +02:00

BUILD : 1.7.5 (407) BUGS : 185, 190 NOTES : TTB work again, and RestrictOperNicks is no longer case sensitive

git-svn-id: svn://svn.anope.org/anope/trunk@407 31f1291d-b8d6-0310-a050-a5561fc1590b


git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@271 5417fbe8-f217-4b02-8779-1006273d7864
This commit is contained in:
trystan trystan@31f1291d-b8d6-0310-a050-a5561fc1590b
2004-10-16 20:36:54 +00:00
parent 0700ca7742
commit f3a1ab41ad
4 changed files with 70 additions and 20 deletions
+6 -4
View File
@@ -31,10 +31,12 @@ Provided by Trystan <trystan@nomadirc.net> - 2004
09/07 A Ircd CHANMODE now trapped and stored. [ #00]
08/23 A New protocol independent design (aka anope-capab). [ #00]
08/28 A New IRCD document for adding new ircd support to new design. [ #00]
10/16 F Fixed tsbuf not being sent on registration [#180]
10/15 F Fixed OS JUPE [#147]
10/14 F Fixed NickServ Logout [#180]
10/14 F Fixed HelpChannel with Unreal [#180]
10/16 F Fixed BS TTB. [#185]
10/16 F RestrictOperNicks is no longer case sensitive. [#190]
10/16 F Fixed tsbuf not being sent on registration. [#180]
10/15 F Fixed OS JUPE. [#147]
10/14 F Fixed NickServ Logout. [#180]
10/14 F Fixed HelpChannel with Unreal. [#180]
10/09 F Bug in MySQL debug, possibly causing segfaults. [#149]
10/09 F Lots of code clean up to prevent segfaults [ #00]
10/07 F Fixed TSMODE ircds that don't stay this in their CAPAB [ #00]
+53 -9
View File
@@ -1893,12 +1893,21 @@ static int do_kickcmd(User * u)
if (ttb) {
ci->ttb[TTB_BADWORDS] =
strtol(ttb, (char **) NULL, 10);
if (errno) {
/* Only error if errno returns ERANGE or EINVAL or we are less then 0 - TSL */
if (errno == ERANGE || errno == EINVAL
|| ci->ttb[TTB_BADWORDS] < 0) {
/* leaving the debug behind since we might want to know what these are */
if (debug) {
alog("debug: errno is %d ERANGE %d EINVAL %d ttb %d", errno, ERANGE, EINVAL, ci->ttb[TTB_BADWORDS]);
}
/* reset the value back to 0 - TSL */
ci->ttb[TTB_BADWORDS] = 0;
notice_lang(s_BotServ, u, BOT_KICK_BAD_TTB, ttb);
return MOD_CONT;
}
} else
} else {
ci->ttb[TTB_BADWORDS] = 0;
}
ci->botflags |= BS_KICK_BADWORDS;
if (ci->ttb[TTB_BADWORDS])
notice_lang(s_BotServ, u, BOT_KICK_BADWORDS_ON_BAN,
@@ -1913,7 +1922,12 @@ static int do_kickcmd(User * u)
if (!stricmp(value, "ON")) {
if (ttb) {
ci->ttb[TTB_BOLDS] = strtol(ttb, (char **) NULL, 10);
if (errno) {
if (errno == ERANGE || errno == EINVAL
|| ci->ttb[TTB_BOLDS] < 0) {
if (debug) {
alog("debug: errno is %d ERANGE %d EINVAL %d ttb %d", errno, ERANGE, EINVAL, ci->ttb[TTB_BOLDS]);
}
ci->ttb[TTB_BOLDS] = 0;
notice_lang(s_BotServ, u, BOT_KICK_BAD_TTB, ttb);
return MOD_CONT;
}
@@ -1936,7 +1950,12 @@ static int do_kickcmd(User * u)
if (ttb) {
ci->ttb[TTB_CAPS] = strtol(ttb, (char **) NULL, 10);
if (errno) {
if (errno == ERANGE || errno == EINVAL
|| ci->ttb[TTB_CAPS] < 0) {
if (debug) {
alog("debug: errno is %d ERANGE %d EINVAL %d ttb %d", errno, ERANGE, EINVAL, ci->ttb[TTB_CAPS]);
}
ci->ttb[TTB_CAPS] = 0;
notice_lang(s_BotServ, u, BOT_KICK_BAD_TTB, ttb);
return MOD_CONT;
}
@@ -1973,7 +1992,12 @@ static int do_kickcmd(User * u)
if (!stricmp(value, "ON")) {
if (ttb) {
ci->ttb[TTB_COLORS] = strtol(ttb, (char **) NULL, 10);
if (errno) {
if (errno == ERANGE || errno == EINVAL
|| ci->ttb[TTB_COLORS] < 0) {
if (debug) {
alog("debug: errno is %d ERANGE %d EINVAL %d ttb %d", errno, ERANGE, EINVAL, ci->ttb[TTB_COLORS]);
}
ci->ttb[TTB_COLORS] = 0;
notice_lang(s_BotServ, u, BOT_KICK_BAD_TTB, ttb);
return MOD_CONT;
}
@@ -1996,7 +2020,12 @@ static int do_kickcmd(User * u)
if (ttb) {
ci->ttb[TTB_FLOOD] = strtol(ttb, (char **) NULL, 10);
if (errno) {
if (errno == ERANGE || errno == EINVAL
|| ci->ttb[TTB_FLOOD] < 0) {
if (debug) {
alog("debug: errno is %d ERANGE %d EINVAL %d ttb %d", errno, ERANGE, EINVAL, ci->ttb[TTB_FLOOD]);
}
ci->ttb[TTB_FLOOD] = 0;
notice_lang(s_BotServ, u, BOT_KICK_BAD_TTB, ttb);
return MOD_CONT;
}
@@ -2035,7 +2064,12 @@ static int do_kickcmd(User * u)
if (ttb) {
ci->ttb[TTB_REPEAT] = strtol(ttb, (char **) NULL, 10);
if (errno) {
if (errno == ERANGE || errno == EINVAL
|| ci->ttb[TTB_REPEAT] < 0) {
if (debug) {
alog("debug: errno is %d ERANGE %d EINVAL %d ttb %d", errno, ERANGE, EINVAL, ci->ttb[TTB_REPEAT]);
}
ci->ttb[TTB_REPEAT] = 0;
notice_lang(s_BotServ, u, BOT_KICK_BAD_TTB, ttb);
return MOD_CONT;
}
@@ -2065,7 +2099,12 @@ static int do_kickcmd(User * u)
if (ttb) {
ci->ttb[TTB_REVERSES] =
strtol(ttb, (char **) NULL, 10);
if (errno) {
if (errno == ERANGE || errno == EINVAL
|| ci->ttb[TTB_REVERSES] < 0) {
if (debug) {
alog("debug: errno is %d ERANGE %d EINVAL %d ttb %d", errno, ERANGE, EINVAL, ci->ttb[TTB_REVERSES]);
}
ci->ttb[TTB_REVERSES] = 0;
notice_lang(s_BotServ, u, BOT_KICK_BAD_TTB, ttb);
return MOD_CONT;
}
@@ -2086,7 +2125,12 @@ static int do_kickcmd(User * u)
if (ttb) {
ci->ttb[TTB_UNDERLINES] =
strtol(ttb, (char **) NULL, 10);
if (errno) {
if (errno == ERANGE || errno == EINVAL
|| ci->ttb[TTB_UNDERLINES] < 0) {
if (debug) {
alog("debug: errno is %d ERANGE %d EINVAL %d ttb %d", errno, ERANGE, EINVAL, ci->ttb[TTB_UNDERLINES]);
}
ci->ttb[TTB_UNDERLINES] = 0;
notice_lang(s_BotServ, u, BOT_KICK_BAD_TTB, ttb);
return MOD_CONT;
}
+6 -6
View File
@@ -2022,21 +2022,21 @@ static int do_register(User * u)
if (RestrictOperNicks) {
for (i = 0; i < RootNumber; i++) {
if (strstr(u->nick, ServicesRoots[i]) && !is_oper(u)) {
if (stristr(u->nick, ServicesRoots[i]) && !is_oper(u)) {
notice_lang(s_NickServ, u, NICK_CANNOT_BE_REGISTERED,
u->nick);
return MOD_CONT;
}
}
for (i = 0; i < servadmins.count && (nc = servadmins.list[i]); i++) {
if (strstr(u->nick, nc->display) && !is_oper(u)) {
if (stristr(u->nick, nc->display) && !is_oper(u)) {
notice_lang(s_NickServ, u, NICK_CANNOT_BE_REGISTERED,
u->nick);
return MOD_CONT;
}
}
for (i = 0; i < servopers.count && (nc = servopers.list[i]); i++) {
if (strstr(u->nick, nc->display) && !is_oper(u)) {
if (stristr(u->nick, nc->display) && !is_oper(u)) {
notice_lang(s_NickServ, u, NICK_CANNOT_BE_REGISTERED,
u->nick);
return MOD_CONT;
@@ -2342,21 +2342,21 @@ static int do_group(User * u)
if (RestrictOperNicks) {
for (i = 0; i < RootNumber; i++) {
if (strstr(u->nick, ServicesRoots[i]) && !is_oper(u)) {
if (stristr(u->nick, ServicesRoots[i]) && !is_oper(u)) {
notice_lang(s_NickServ, u, NICK_CANNOT_BE_REGISTERED,
u->nick);
return MOD_CONT;
}
}
for (i = 0; i < servadmins.count && (nc = servadmins.list[i]); i++) {
if (strstr(u->nick, nc->display) && !is_oper(u)) {
if (stristr(u->nick, nc->display) && !is_oper(u)) {
notice_lang(s_NickServ, u, NICK_CANNOT_BE_REGISTERED,
u->nick);
return MOD_CONT;
}
}
for (i = 0; i < servopers.count && (nc = servopers.list[i]); i++) {
if (strstr(u->nick, nc->display) && !is_oper(u)) {
if (stristr(u->nick, nc->display) && !is_oper(u)) {
notice_lang(s_NickServ, u, NICK_CANNOT_BE_REGISTERED,
u->nick);
return MOD_CONT;
+5 -1
View File
@@ -8,10 +8,14 @@
VERSION_MAJOR="1"
VERSION_MINOR="7"
VERSION_PATCH="5"
VERSION_BUILD="406"
VERSION_BUILD="407"
# $Log$
#
# BUILD : 1.7.5 (407)
# BUGS : 185, 190
# NOTES : TTB work again, and RestrictOperNicks is no longer case sensitive
#
# BUILD : 1.7.5 (406)
# BUGS : N/A
# NOTES : Forgot the changes file