return (their_param < our_param);
}
- ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding)
+ ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding, bool)
{
if (adding)
{
if (!ServerInstance->IsChannel(parameter.c_str()))
{
- source->WriteServ("403 %s %s :Invalid channel name",source->nick, parameter.c_str());
+ source->WriteNumeric(403, "%s %s :Invalid channel name",source->nick, parameter.c_str());
parameter.clear();
return MODEACTION_DENY;
}
{
if ((c == channel) || (c->IsModeSet('L')))
{
- source->WriteServ("690 %s :Circular or chained +L to %s not allowed (Channel already has +L). Pack of wild dogs has been unleashed.",source->nick,parameter.c_str());
+ source->WriteNumeric(690, "%s :Circular or chained +L to %s not allowed (Channel already has +L). Pack of wild dogs has been unleashed.",source->nick,parameter.c_str());
parameter.clear();
return MODEACTION_DENY;
}
{
if ((i->second != channel) && (i->second->IsModeSet('L')) && (irc::string(i->second->GetModeParameter('L').c_str()) == irc::string(channel->name)))
{
- source->WriteServ("690 %s :Circular or chained +L to %s not allowed (Already forwarded here from %s). Angry monkeys dispatched.",source->nick,parameter.c_str(),i->second->name);
+ source->WriteNumeric(690, "%s :Circular or chained +L to %s not allowed (Already forwarded here from %s). Angry monkeys dispatched.",source->nick,parameter.c_str(),i->second->name);
return MODEACTION_DENY;
}
}
destchan = ServerInstance->FindChan(channel);
if (destchan && destchan->IsModeSet('L'))
{
- user->WriteServ("470 %s :%s is full, but has a circular redirect (+L), not following redirection to %s", user->nick, cname, channel.c_str());
+ user->WriteNumeric(470, "%s :%s is full, but has a circular redirect (+L), not following redirection to %s", user->nick, cname, channel.c_str());
return 1;
}
- user->WriteServ("470 %s :%s has become full, so you are automatically being transferred to the linked channel %s", user->nick, cname, channel.c_str());
- Channel::JoinUser(ServerInstance, user, channel.c_str(), false, "", false, ServerInstance->Time(true));
+ user->WriteNumeric(470, "%s :%s has become full, so you are automatically being transferred to the linked channel %s", user->nick, cname, channel.c_str());
+ Channel::JoinUser(ServerInstance, user, channel.c_str(), false, "", false, ServerInstance->Time());
return 1;
}
}
virtual Version GetVersion()
{
- return Version(1, 1, 0, 0, VF_COMMON | VF_VENDOR, API_VERSION);
+ return Version(1, 2, 0, 0, VF_COMMON | VF_VENDOR, API_VERSION);
}
};