1
0
mirror of https://github.com/anope/anope.git synced 2026-07-04 22:33:12 +02:00

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
This commit is contained in:
Adam-
2010-01-15 19:30:11 +00:00
parent f432789853
commit c4c1242ac7
2 changed files with 14 additions and 4 deletions
+10 -4
View File
@@ -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])
+4
View File
@@ -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)