* | Inspire Internet Relay Chat Daemon |
* +------------------------------------+
*
- * InspIRCd: (C) 2002-2007 InspIRCd Development Team
+ * InspIRCd: (C) 2002-2008 InspIRCd Development Team
* See: http://www.inspircd.org/wiki/index.php/Credits
*
* This program is free but copyrighted software; see
{
}
-ModeAction ModeChannelBan::OnModeChange(userrec* source, userrec* dest, chanrec* channel, std::string ¶meter, bool adding)
+ModeAction ModeChannelBan::OnModeChange(User* source, User*, Channel* channel, std::string ¶meter, bool adding)
{
int status = channel->GetStatus(source);
/* Call the correct method depending on wether we're adding or removing the mode */
return MODEACTION_ALLOW;
}
-void ModeChannelBan::RemoveMode(chanrec* channel)
+void ModeChannelBan::RemoveMode(Channel* channel)
{
BanList copy;
char moderemove[MAXBUF];
- userrec* n = new userrec(ServerInstance);
- n->SetFd(FD_MAGIC_NUMBER);
for (BanList::iterator i = channel->bans.begin(); i != channel->bans.end(); i++)
{
copy.push_back(*i);
}
+
for (BanList::iterator i = copy.begin(); i != copy.end(); i++)
{
sprintf(moderemove,"-%c",this->GetModeChar());
const char* parameters[] = { channel->name, moderemove, i->data };
- ServerInstance->SendMode(parameters, 3, n);
+ ServerInstance->SendMode(parameters, 3, ServerInstance->FakeClient);
}
-
- delete n;
}
-void ModeChannelBan::RemoveMode(userrec* user)
+void ModeChannelBan::RemoveMode(User*)
{
}
-void ModeChannelBan::DisplayList(userrec* user, chanrec* channel)
+void ModeChannelBan::DisplayList(User* user, Channel* channel)
{
/* Display the channel banlist */
for (BanList::reverse_iterator i = channel->bans.rbegin(); i != channel->bans.rend(); ++i)
return;
}
-std::string& ModeChannelBan::AddBan(userrec *user,std::string &dest,chanrec *chan,int status)
+void ModeChannelBan::DisplayEmptyList(User* user, Channel* channel)
+{
+ user->WriteServ("368 %s %s :End of channel ban list",user->nick, channel->name);
+}
+
+std::string& ModeChannelBan::AddBan(User *user, std::string &dest, Channel *chan, int)
{
if ((!user) || (!chan))
{
return dest;
}
-ModePair ModeChannelBan::ModeSet(userrec* source, userrec* dest, chanrec* channel, const std::string ¶meter)
+ModePair ModeChannelBan::ModeSet(User*, User*, Channel* channel, const std::string ¶meter)
{
for (BanList::iterator i = channel->bans.begin(); i != channel->bans.end(); i++)
{
return std::make_pair(false, parameter);
}
-std::string& ModeChannelBan::DelBan(userrec *user,std::string& dest,chanrec *chan,int status)
+std::string& ModeChannelBan::DelBan(User *user, std::string& dest, Channel *chan, int)
{
if ((!user) || (!chan))
{