1
0
mirror of https://github.com/anope/anope.git synced 2026-07-03 08:13:15 +02:00

Use MessageSource as the source for many IRCDProto funcs

Keep track of what user modes are oper only/server only/etc
This commit is contained in:
Adam
2013-08-01 13:16:18 +00:00
parent 402c624e45
commit 1e625b6837
50 changed files with 455 additions and 488 deletions
+3 -3
View File
@@ -24,6 +24,7 @@
#include "access.h"
#include "sockets.h"
#include "language.h"
#include "uplink.h"
channel_map ChannelList;
@@ -681,7 +682,7 @@ bool Channel::MatchesList(User *u, const Anope::string &mode)
return false;
}
void Channel::KickInternal(MessageSource &source, const Anope::string &nick, const Anope::string &reason)
void Channel::KickInternal(const MessageSource &source, const Anope::string &nick, const Anope::string &reason)
{
User *sender = source.GetUser();
User *target = User::Find(nick);
@@ -737,8 +738,7 @@ bool Channel::Kick(BotInfo *bi, User *u, const char *reason, ...)
if (MOD_RESULT == EVENT_STOP)
return false;
IRCD->SendKick(bi, this, u, "%s", buf);
MessageSource ms(bi);
this->KickInternal(ms, u->nick, buf);
this->KickInternal(bi, u->nick, buf);
return true;
}