summaryrefslogtreecommitdiff
path: root/actions.c
diff options
context:
space:
mode:
authordane dane@31f1291d-b8d6-0310-a050-a5561fc1590b <dane dane@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>2004-06-12 14:02:30 +0000
committerdane dane@31f1291d-b8d6-0310-a050-a5561fc1590b <dane dane@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>2004-06-12 14:02:30 +0000
commite8383c6ccd01185c18595647b49be3a1072ad495 (patch)
tree1c4d6b687bec6fbb744488e52b2fd9d35e6f8cc0 /actions.c
parentab0f2d33320a1e1b1d3d2aa38857b08cc908f36f (diff)
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
Diffstat (limited to 'actions.c')
-rw-r--r--actions.c12
1 files changed, 7 insertions, 5 deletions
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
}
/*************************************************************************/