From e8383c6ccd01185c18595647b49be3a1072ad495 Mon Sep 17 00:00:00 2001 From: "dane dane@31f1291d-b8d6-0310-a050-a5561fc1590b" Date: Sat, 12 Jun 2004 14:02:30 +0000 Subject: BUILD : 1.7.3 (188) BUGS : 101 NOTES : Unified kill_user function to handle all ircd protocols. git-svn-id: svn://svn.anope.org/anope/trunk@188 31f1291d-b8d6-0310-a050-a5561fc1590b git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@133 5417fbe8-f217-4b02-8779-1006273d7864 --- Changes | 1 + actions.c | 12 +++++++----- nickserv.c | 8 -------- operserv.c | 4 ---- protocol.c | 14 -------------- version.log | 6 +++++- 6 files changed, 13 insertions(+), 32 deletions(-) diff --git a/Changes b/Changes index c06fede67..d9b11d9e7 100644 --- a/Changes +++ b/Changes @@ -9,6 +9,7 @@ Provided by Anope Dev. - 2004 05/24 A New NSNickTracking directive to provide nick tracking. [ #71] 05/21 A Auto enforce upon AKICK addition. [ #63] 05/21 A New file docs/OLDCHANGES contains all change history. [ #65] +06/12 F Unified kill_user function to handle all ircd protocols. [#101] 06/10 F Added check to see if MysqlUser and MysqlName were not null. [ #92] 06/09 F Corrected a number of spelling errors in en_us.l. [ #94] 06/09 F Corrected a large number of spelling and typing errors in docs. [ #87] diff --git a/actions.c b/actions.c index 53c6dd5b7..79018640c 100644 --- a/actions.c +++ b/actions.c @@ -33,12 +33,7 @@ void bad_password(User * u) u->invalid_pw_count++; u->invalid_pw_time = now; if (u->invalid_pw_count >= BadPassLimit) -#ifdef IRC_BAHAMUT - send_cmd(NULL, "SVSKILL %s :%s", u->nick, - "Too many invalid passwords"); -#else kill_user(NULL, u->nick, "Too many invalid passwords"); -#endif } /*************************************************************************/ @@ -73,6 +68,12 @@ void change_user_mode(User * u, char *modes, char *arg) void kill_user(const char *source, const char *user, const char *reason) { +#ifdef IRC_BAHAMUT + /* Bahamut uses SVSKILL as a better way to kill users. It sends back + * a QUIT message that Anope uses to clean up after the kill is done. + */ + send_cmd(NULL, "SVSKILL %s :%s", user, reason); +#else char *av[2]; char buf[BUFSIZE]; @@ -89,6 +90,7 @@ void kill_user(const char *source, const char *user, const char *reason) send_cmd(source, "KILL %s :%s", user, av[1]); do_kill(source, 2, av); free(av[0]); +#endif } /*************************************************************************/ diff --git a/nickserv.c b/nickserv.c index 207c2dec7..c8c7546c6 100644 --- a/nickserv.c +++ b/nickserv.c @@ -3839,11 +3839,7 @@ static int do_ghost(User * u) char buf[NICKMAX + 32]; snprintf(buf, sizeof(buf), "GHOST command used by %s", u->nick); -#ifdef IRC_BAHAMUT - send_cmd(NULL, "SVSKILL %s :%s", nick, buf); -#else kill_user(s_NickServ, nick, buf); -#endif notice_lang(s_NickServ, u, NICK_GHOST_KILLED, nick); } else { notice_lang(s_NickServ, u, ACCESS_DENIED); @@ -3859,11 +3855,7 @@ static int do_ghost(User * u) char buf[NICKMAX + 32]; snprintf(buf, sizeof(buf), "GHOST command used by %s", u->nick); -#ifdef IRC_BAHAMUT - send_cmd(NULL, "SVSKILL %s :%s", nick, buf); -#else kill_user(s_NickServ, nick, buf); -#endif notice_lang(s_NickServ, u, NICK_GHOST_KILLED, nick); } else { notice_lang(s_NickServ, u, ACCESS_DENIED); diff --git a/operserv.c b/operserv.c index fecded169..94adfaafa 100644 --- a/operserv.c +++ b/operserv.c @@ -4460,11 +4460,7 @@ static int do_noop(User * u) u3 = nextuser(); if ((u2) && is_oper(u2) && (u2->server) && !stricmp(u2->server, server)) { -#ifdef IRC_BAHAMUT - send_cmd(ServerName, "SVSKILL %s :%s", u2->nick, reason); -#else kill_user(s_OperServ, u2->nick, reason); -#endif } } } else if (!stricmp(cmd, "REVOKE")) { diff --git a/protocol.c b/protocol.c index 0a6107d8c..ba021bf3f 100644 --- a/protocol.c +++ b/protocol.c @@ -109,22 +109,8 @@ void s_sqline(char *mask, char *reason) } } else { #endif - /* int i; - User *u, *next; */ - send_cmd(NULL, "SQLINE %s :%s", mask, reason); - /* for (i = 0; i < 1024; i++) { - for (u = userlist[i]; u; u = next) { - next = u->next; - if (match_wild_nocase(mask, u->nick)) - #ifdef IRC_BAHAMUT - send_cmd(NULL, "SVSKILL %s :%s", u->nick, reason); - #else - kill_user(s_OperServ, u->nick, reason); - #endif - } - } */ #ifdef IRC_BAHAMUT } #endif diff --git a/version.log b/version.log index c438be992..18f79f4ce 100644 --- a/version.log +++ b/version.log @@ -8,10 +8,14 @@ VERSION_MAJOR="1" VERSION_MINOR="7" VERSION_PATCH="3" -VERSION_BUILD="187" +VERSION_BUILD="188" # $Log$ # +# BUILD : 1.7.3 (188) +# BUGS : 101 +# NOTES : Unified kill_user function to handle all ircd protocols. +# # BUILD : 1.7.3 (187) # BUGS : 102 # NOTES : Removed duplicate ULTIMATE3 define. -- cgit