diff options
author | dane dane@31f1291d-b8d6-0310-a050-a5561fc1590b <dane dane@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864> | 2004-08-23 18:36:58 +0000 |
---|---|---|
committer | dane dane@31f1291d-b8d6-0310-a050-a5561fc1590b <dane dane@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864> | 2004-08-23 18:36:58 +0000 |
commit | 61a23cd017465cd2bff5f037cf54e051a6318b37 (patch) | |
tree | 5827cad42b833c88be5783d457ffb03b00c785bf /src/sessions.c | |
parent | 26ea4bc11b4e07bbeb95031f2337ff695f83cc16 (diff) |
BUILD : 1.7.5 (327) BUGS : none NOTES : Merged anope-capab into main trunk...
git-svn-id: svn://svn.anope.org/anope/trunk@327 31f1291d-b8d6-0310-a050-a5561fc1590b
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@203 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/sessions.c')
-rw-r--r-- | src/sessions.c | 30 |
1 files changed, 13 insertions, 17 deletions
diff --git a/src/sessions.c b/src/sessions.c index 1620a2e15..948d28807 100644 --- a/src/sessions.c +++ b/src/sessions.c @@ -219,7 +219,7 @@ static Session *findsession(const char *host) * Returns 1 if the host was added or 0 if the user was killed. */ -int add_session(const char *nick, const char *host) +int add_session(char *nick, char *host) { Session *session, **list; Exception *exception; @@ -245,12 +245,8 @@ int add_session(const char *nick, const char *host) /* We don't use kill_user() because a user stucture has not yet * been created. Simply kill the user. -TheShadow */ -#ifdef IRC_BAHAMUT - send_cmd(NULL, "SVSKILL %s :Session limit exceeded", nick); -#else - send_cmd(s_OperServ, "KILL %s :%s (Session limit exceeded)", - nick, s_OperServ); -#endif + kill_user(s_OperServ, nick, "Session limit exceeded"); + session->hits++; if (MaxSessionKill && session->hits >= MaxSessionKill) { char akillmask[BUFSIZE]; @@ -258,9 +254,9 @@ int add_session(const char *nick, const char *host) add_akill(NULL, akillmask, s_OperServ, time(NULL) + SessionAutoKillExpiry, "Session limit exceeded"); - wallops(s_OperServ, - "Added a temporary AKILL for \2%s\2 due to excessive connections", - akillmask); + anope_cmd_global(s_OperServ, + "Added a temporary AKILL for \2%s\2 due to excessive connections", + akillmask); } return 0; } else { @@ -292,9 +288,9 @@ void del_session(const char *host) session = findsession(host); if (!session) { - wallops(s_OperServ, - "WARNING: Tried to delete non-existant session: \2%s", - host); + anope_cmd_global(s_OperServ, + "WARNING: Tried to delete non-existant session: \2%s", + host); alog("session: Tried to delete non-existant session: %s", host); return; } @@ -337,9 +333,9 @@ void expire_exceptions(void) if (exceptions[i].expires == 0 || exceptions[i].expires > now) continue; if (WallExceptionExpire) - wallops(s_OperServ, - "Session limit exception for %s has expired.", - exceptions[i].mask); + anope_cmd_global(s_OperServ, + "Session limit exception for %s has expired.", + exceptions[i].mask); free(exceptions[i].mask); free(exceptions[i].reason); nexceptions--; @@ -429,7 +425,7 @@ void load_exceptions() restore_db(f); \ log_perror("Write error on %s", ExceptionDBName); \ if (time(NULL) - lastwarn > WarningTimeout) { \ - wallops(NULL, "Write error on %s: %s", ExceptionDBName, \ + anope_cmd_global(NULL, "Write error on %s: %s", ExceptionDBName, \ strerror(errno)); \ lastwarn = time(NULL); \ } \ |