diff options
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) |