X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_redirect.cpp;h=44cea9b0bd64bd8cbc9a263433cec708cefd2193;hb=bc344671460c1675fbc31504fd1ffc03ff58a135;hp=9dc8aa5b72c8e0ba31a152f1a0cb9eeade722f14;hpb=29b51086b95c86f812ac35ed7d3333f060ba5a8c;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_redirect.cpp b/src/modules/m_redirect.cpp index 9dc8aa5b7..44cea9b0b 100644 --- a/src/modules/m_redirect.cpp +++ b/src/modules/m_redirect.cpp @@ -44,7 +44,7 @@ class Redirect : public ModeHandler 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; } @@ -57,7 +57,7 @@ class Redirect : public ModeHandler { 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; } @@ -67,7 +67,7 @@ class Redirect : public ModeHandler { 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; } } @@ -112,7 +112,7 @@ class ModuleRedirect : public Module } - virtual int OnUserPreJoin(User* user, Channel* chan, const char* cname, std::string &privs) + virtual int OnUserPreJoin(User* user, Channel* chan, const char* cname, std::string &privs, const std::string &keygiven) { if (chan) { @@ -127,11 +127,11 @@ class ModuleRedirect : public Module 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()); + 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; } @@ -148,7 +148,7 @@ class ModuleRedirect : public Module 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); } };