diff options
author | Adam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864> | 2010-01-15 19:30:11 +0000 |
---|---|---|
committer | Adam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864> | 2010-01-15 19:30:11 +0000 |
commit | c4c1242ac73ed20ffbfe6ab3c47889fa5c3cbe04 (patch) | |
tree | a65943ca755536504a5708fce0d7c50584fe6762 /src | |
parent | f4327898532fbd1c95d50f3a19b9d096668315fe (diff) |
Fixed bug #1135 - Don't kick or ban ulined clients
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2762 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src')
-rw-r--r-- | src/botserv.c | 14 | ||||
-rw-r--r-- | src/channels.c | 4 |
2 files changed, 14 insertions, 4 deletions
diff --git a/src/botserv.c b/src/botserv.c index a90c16817..855797ef1 100644 --- a/src/botserv.c +++ b/src/botserv.c @@ -659,15 +659,21 @@ void bot_join(ChannelInfo * ci) /*************************************************************************/ -/* This makes a ban if the user has to have one. In every cases it increments - the kick count for the user. */ - -static void check_ban(ChannelInfo * ci, User * u, int ttbtype) +/** Check if a user should be banned by botserv + * @param ci The channel the user is on + * @param u The user + * @param ttbtype The type of bot kicker the user should be checked against + */ +static void check_ban(ChannelInfo *ci, User *u, int ttbtype) { BanData *bd = get_ban_data(ci->c, u); if (!bd) return; + + /* Don't ban ulines */ + if (is_ulined(u->server->name)) + return; bd->ttb[ttbtype]++; if (ci->ttb[ttbtype] && bd->ttb[ttbtype] >= ci->ttb[ttbtype]) diff --git a/src/channels.c b/src/channels.c index b426d73e4..5f18ad4bb 100644 --- a/src/channels.c +++ b/src/channels.c @@ -932,6 +932,10 @@ bool Channel::Kick(BotInfo *bi, User *u, const char *reason, ...) vsnprintf(buf, BUFSIZE - 1, reason, args); va_end(args); + /* May not kick ulines */ + if (is_ulined(u->server->name)) + return false; + EventReturn MOD_RESULT; FOREACH_RESULT(I_OnBotKick, OnBotKick(bi, this, u, buf)); if (MOD_RESULT == EVENT_STOP) |