diff options
Diffstat (limited to 'modules/protocol/unrealircd.cpp')
-rw-r--r-- | modules/protocol/unrealircd.cpp | 150 |
1 files changed, 75 insertions, 75 deletions
diff --git a/modules/protocol/unrealircd.cpp b/modules/protocol/unrealircd.cpp index c3a3b5769..d423874b9 100644 --- a/modules/protocol/unrealircd.cpp +++ b/modules/protocol/unrealircd.cpp @@ -36,12 +36,12 @@ class UnrealIRCdProto : public IRCDProto private: /* SVSNOOP */ - void SendSVSNOOP(const Server *server, bool set) anope_override + void SendSVSNOOP(const Server *server, bool set) override { UplinkSocket::Message() << "SVSNOOP " << server->GetSID() << " " << (set ? "+" : "-"); } - void SendAkillDel(const XLine *x) anope_override + void SendAkillDel(const XLine *x) override { if (x->IsRegex() || x->HasNickOrReal()) return; @@ -60,22 +60,22 @@ class UnrealIRCdProto : public IRCDProto UplinkSocket::Message() << "TKL - G " << x->GetUser() << " " << x->GetHost() << " " << x->by; } - void SendTopic(const MessageSource &source, Channel *c) anope_override + void SendTopic(const MessageSource &source, Channel *c) override { UplinkSocket::Message(source) << "TOPIC " << c->name << " " << c->topic_setter << " " << c->topic_ts << " :" << c->topic; } - void SendGlobalNotice(BotInfo *bi, const Server *dest, const Anope::string &msg) anope_override + void SendGlobalNotice(BotInfo *bi, const Server *dest, const Anope::string &msg) override { UplinkSocket::Message(bi) << "NOTICE $" << dest->GetName() << " :" << msg; } - void SendGlobalPrivmsg(BotInfo *bi, const Server *dest, const Anope::string &msg) anope_override + void SendGlobalPrivmsg(BotInfo *bi, const Server *dest, const Anope::string &msg) override { UplinkSocket::Message(bi) << "PRIVMSG $" << dest->GetName() << " :" << msg; } - void SendVhostDel(User *u) anope_override + void SendVhostDel(User *u) override { BotInfo *HostServ = Config->GetClient("HostServ"); u->RemoveMode(HostServ, "CLOAK"); @@ -84,7 +84,7 @@ class UnrealIRCdProto : public IRCDProto u->SetMode(HostServ, "CLOAK"); } - void SendAkill(User *u, XLine *x) anope_override + void SendAkill(User *u, XLine *x) override { if (x->IsRegex() || x->HasNickOrReal()) { @@ -128,18 +128,18 @@ class UnrealIRCdProto : public IRCDProto UplinkSocket::Message() << "TKL + G " << x->GetUser() << " " << x->GetHost() << " " << x->by << " " << Anope::CurTime + timeleft << " " << x->created << " :" << x->GetReason(); } - void SendSVSKillInternal(const MessageSource &source, User *user, const Anope::string &buf) anope_override + void SendSVSKillInternal(const MessageSource &source, User *user, const Anope::string &buf) override { UplinkSocket::Message(source) << "SVSKILL " << user->GetUID() << " :" << buf; user->KillInternal(source, buf); } - void SendModeInternal(const MessageSource &source, User *u, const Anope::string &buf) anope_override + void SendModeInternal(const MessageSource &source, User *u, const Anope::string &buf) override { UplinkSocket::Message(source) << "SVS2MODE " << u->GetUID() <<" " << buf; } - void SendClientIntroduction(User *u) anope_override + void SendClientIntroduction(User *u) override { Anope::string modes = "+" + u->GetModes(); UplinkSocket::Message(u->server) << "UID " << u->nick << " 1 " << u->timestamp << " " << u->GetIdent() << " " << u->host << " " @@ -147,7 +147,7 @@ class UnrealIRCdProto : public IRCDProto << (!u->chost.empty() ? u->chost : "*") << " " << "*" << " :" << u->realname; } - void SendServer(const Server *server) anope_override + void SendServer(const Server *server) override { if (server == Me) UplinkSocket::Message() << "SERVER " << server->GetName() << " " << server->GetHops() + 1 << " :" << server->GetDescription(); @@ -156,7 +156,7 @@ class UnrealIRCdProto : public IRCDProto } /* JOIN */ - void SendJoin(User *user, Channel *c, const ChannelStatus *status) anope_override + void SendJoin(User *user, Channel *c, const ChannelStatus *status) override { UplinkSocket::Message(Me) << "SJOIN " << c->creation_time << " " << c->name << " +" << c->GetModes(true, true) << " :" << user->GetUID(); @@ -182,7 +182,7 @@ class UnrealIRCdProto : public IRCDProto /* unsqline */ - void SendSQLineDel(const XLine *x) anope_override + void SendSQLineDel(const XLine *x) override { UplinkSocket::Message() << "UNSQLINE " << x->mask; } @@ -192,14 +192,14 @@ class UnrealIRCdProto : public IRCDProto ** - Unreal will translate this to TKL for us ** */ - void SendSQLine(User *, const XLine *x) anope_override + void SendSQLine(User *, const XLine *x) override { UplinkSocket::Message() << "SQLINE " << x->mask << " :" << x->GetReason(); } /* Functions that use serval cmd functions */ - void SendVhost(User *u, const Anope::string &vIdent, const Anope::string &vhost) anope_override + void SendVhost(User *u, const Anope::string &vIdent, const Anope::string &vhost) override { if (!vIdent.empty()) UplinkSocket::Message(Me) << "CHGIDENT " << u->GetUID() << " " << vIdent; @@ -211,7 +211,7 @@ class UnrealIRCdProto : public IRCDProto u->SetMode(bi, "VHOST"); } - void SendConnect() anope_override + void SendConnect() override { /* NICKv2 = Nick Version 2 @@ -232,7 +232,7 @@ class UnrealIRCdProto : public IRCDProto SendServer(Me); } - void SendSASLMechanisms(std::vector<Anope::string> &mechanisms) anope_override + void SendSASLMechanisms(std::vector<Anope::string> &mechanisms) override { Anope::string mechlist; for (unsigned i = 0; i < mechanisms.size(); ++i) @@ -242,13 +242,13 @@ class UnrealIRCdProto : public IRCDProto } /* SVSHOLD - set */ - void SendSVSHold(const Anope::string &nick, time_t t) anope_override + void SendSVSHold(const Anope::string &nick, time_t t) override { UplinkSocket::Message() << "TKL + Q H " << nick << " " << Me->GetName() << " " << Anope::CurTime + t << " " << Anope::CurTime << " :Being held for registered user"; } /* SVSHOLD - release */ - void SendSVSHoldDel(const Anope::string &nick) anope_override + void SendSVSHoldDel(const Anope::string &nick) override { UplinkSocket::Message() << "TKL - Q * " << nick << " " << Me->GetName(); } @@ -257,19 +257,19 @@ class UnrealIRCdProto : public IRCDProto /* * SVSNLINE - :realname mask */ - void SendSGLineDel(const XLine *x) anope_override + void SendSGLineDel(const XLine *x) override { UplinkSocket::Message() << "SVSNLINE - :" << x->mask; } /* UNSZLINE */ - void SendSZLineDel(const XLine *x) anope_override + void SendSZLineDel(const XLine *x) override { UplinkSocket::Message() << "TKL - Z * " << x->GetHost() << " " << x->by; } /* SZLINE */ - void SendSZLine(User *, const XLine *x) anope_override + void SendSZLine(User *, const XLine *x) override { // Calculate the time left before this would expire, capping it at 2 days time_t timeleft = x->expires - Anope::CurTime; @@ -282,7 +282,7 @@ class UnrealIRCdProto : public IRCDProto /* * SVSNLINE + reason_where_is_space :realname mask with spaces */ - void SendSGLine(User *, const XLine *x) anope_override + void SendSGLine(User *, const XLine *x) override { Anope::string edited_reason = x->GetReason(); edited_reason = edited_reason.replace_all_cs(" ", "_"); @@ -298,7 +298,7 @@ class UnrealIRCdProto : public IRCDProto /* In older Unreal SVSJOIN and SVSNLINE tokens were mixed so SVSJOIN and SVSNLINE are broken when coming from a none TOKEN'd server */ - void SendSVSJoin(const MessageSource &source, User *user, const Anope::string &chan, const Anope::string ¶m) anope_override + void SendSVSJoin(const MessageSource &source, User *user, const Anope::string &chan, const Anope::string ¶m) override { if (!param.empty()) UplinkSocket::Message() << "SVSJOIN " << user->GetUID() << " " << chan << " :" << param; @@ -306,7 +306,7 @@ class UnrealIRCdProto : public IRCDProto UplinkSocket::Message() << "SVSJOIN " << user->GetUID() << " " << chan; } - void SendSVSPart(const MessageSource &source, User *user, const Anope::string &chan, const Anope::string ¶m) anope_override + void SendSVSPart(const MessageSource &source, User *user, const Anope::string &chan, const Anope::string ¶m) override { if (!param.empty()) UplinkSocket::Message() << "SVSPART " << user->GetUID() << " " << chan << " :" << param; @@ -314,22 +314,22 @@ class UnrealIRCdProto : public IRCDProto UplinkSocket::Message() << "SVSPART " << user->GetUID() << " " << chan; } - void SendGlobopsInternal(const MessageSource &source, const Anope::string &buf) anope_override + void SendGlobopsInternal(const MessageSource &source, const Anope::string &buf) override { UplinkSocket::Message(Me) << "SENDUMODE o :from " << source.GetName() << ": " << buf; } - void SendSWhois(const MessageSource &source, const Anope::string &who, const Anope::string &mask) anope_override + void SendSWhois(const MessageSource &source, const Anope::string &who, const Anope::string &mask) override { UplinkSocket::Message() << "SWHOIS " << who << " :" << mask; } - void SendEOB() anope_override + void SendEOB() override { UplinkSocket::Message(Me) << "EOS"; } - bool IsNickValid(const Anope::string &nick) anope_override + bool IsNickValid(const Anope::string &nick) override { if (nick.equals_ci("ircd") || nick.equals_ci("irc")) return false; @@ -337,7 +337,7 @@ class UnrealIRCdProto : public IRCDProto return IRCDProto::IsNickValid(nick); } - bool IsChannelValid(const Anope::string &chan) anope_override + bool IsChannelValid(const Anope::string &chan) override { if (chan.find(':') != Anope::string::npos) return false; @@ -345,12 +345,12 @@ class UnrealIRCdProto : public IRCDProto return IRCDProto::IsChannelValid(chan); } - bool IsExtbanValid(const Anope::string &mask) anope_override + bool IsExtbanValid(const Anope::string &mask) override { return mask.length() >= 4 && mask[0] == '~' && mask[2] == ':'; } - void SendLogin(User *u, NickAlias *na) anope_override + void SendLogin(User *u, NickAlias *na) override { /* 3.2.10.4+ treats users logged in with accounts as fully registered, even if -r, so we can not set this here. Just use the timestamp. */ if (Servers::Capab.count("ESVID") > 0 && !na->nc->HasExt("UNCONFIRMED")) @@ -359,18 +359,18 @@ class UnrealIRCdProto : public IRCDProto IRCD->SendMode(Config->GetClient("NickServ"), u, "+d %d", u->signon); } - void SendLogout(User *u) anope_override + void SendLogout(User *u) override { IRCD->SendMode(Config->GetClient("NickServ"), u, "+d 0"); } - void SendChannel(Channel *c) anope_override + void SendChannel(Channel *c) override { UplinkSocket::Message(Me) << "SJOIN " << c->creation_time << " " << c->name << " +" << c->GetModes(true, true) << " :"; } - void SendSASLMessage(const SASL::Message &message) anope_override + void SendSASLMessage(const SASL::Message &message) override { size_t p = message.target.find('!'); Anope::string distmask; @@ -390,7 +390,7 @@ class UnrealIRCdProto : public IRCDProto UplinkSocket::Message(BotInfo::Find(message.source)) << "SASL " << distmask << " " << message.target << " " << message.type << " " << message.data << (message.ext.empty() ? "" : " " + message.ext); } - void SendSVSLogin(const Anope::string &uid, NickAlias *na) anope_override + void SendSVSLogin(const Anope::string &uid, NickAlias *na) override { size_t p = uid.find('!'); Anope::string distmask; @@ -409,7 +409,7 @@ class UnrealIRCdProto : public IRCDProto UplinkSocket::Message(Me) << "SVSLOGIN " << distmask << " " << uid << " " << na->nc->display; } - bool IsIdentValid(const Anope::string &ident) anope_override + bool IsIdentValid(const Anope::string &ident) override { if (ident.empty() || ident.length() > Config->GetBlock("networkinfo")->Get<unsigned>("userlen")) return false; @@ -441,13 +441,13 @@ class UnrealExtBan : public ChannelModeVirtual<ChannelModeList> { } - ChannelMode *Wrap(Anope::string ¶m) anope_override + ChannelMode *Wrap(Anope::string ¶m) override { param = "~" + Anope::string(ext) + ":" + param; return ChannelModeVirtual<ChannelModeList>::Wrap(param); } - ChannelMode *Unwrap(ChannelMode *cm, Anope::string ¶m) anope_override + ChannelMode *Unwrap(ChannelMode *cm, Anope::string ¶m) override { if (cm->type != MODE_LIST || param.length() < 4 || param[0] != '~' || param[1] != ext || param[2] != ':') return cm; @@ -466,7 +466,7 @@ namespace UnrealExtban { } - bool Matches(User *u, const Entry *e) anope_override + bool Matches(User *u, const Entry *e) override { const Anope::string &mask = e->GetMask(); Anope::string channel = mask.substr(3); @@ -501,7 +501,7 @@ namespace UnrealExtban { } - bool Matches(User *u, const Entry *e) anope_override + bool Matches(User *u, const Entry *e) override { const Anope::string &mask = e->GetMask(); Anope::string real_mask = mask.substr(3); @@ -517,7 +517,7 @@ namespace UnrealExtban { } - bool Matches(User *u, const Entry *e) anope_override + bool Matches(User *u, const Entry *e) override { const Anope::string &mask = e->GetMask(); Anope::string real_mask = mask.substr(3); @@ -533,7 +533,7 @@ namespace UnrealExtban { } - bool Matches(User *u, const Entry *e) anope_override + bool Matches(User *u, const Entry *e) override { const Anope::string &mask = e->GetMask(); return u->HasMode("REGISTERED") && mask.equals_ci(u->nick); @@ -547,7 +547,7 @@ namespace UnrealExtban { } - bool Matches(User *u, const Entry *e) anope_override + bool Matches(User *u, const Entry *e) override { const Anope::string &mask = e->GetMask(); Anope::string real_mask = mask.substr(3); @@ -563,7 +563,7 @@ namespace UnrealExtban { } - bool Matches(User *u, const Entry *e) anope_override + bool Matches(User *u, const Entry *e) override { const Anope::string &mask = e->GetMask(); Anope::string real_mask = mask.substr(3); @@ -578,7 +578,7 @@ class ChannelModeFlood : public ChannelModeParam ChannelModeFlood(char modeChar, bool minusNoArg) : ChannelModeParam("FLOOD", modeChar, minusNoArg) { } /* Borrowed part of this check from UnrealIRCd */ - bool IsValid(Anope::string &value) const anope_override + bool IsValid(Anope::string &value) const override { if (value.empty()) return false; @@ -630,7 +630,7 @@ class ChannelModeUnrealSSL : public ChannelMode { } - bool CanSet(User *u) const anope_override + bool CanSet(User *u) const override { return false; } @@ -640,7 +640,7 @@ struct IRCDMessageCapab : Message::Capab { IRCDMessageCapab(Module *creator) : Message::Capab(creator, "PROTOCTL") { } - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) override { for (unsigned i = 0; i < params.size(); ++i) { @@ -809,7 +809,7 @@ struct IRCDMessageChgHost : IRCDMessage { IRCDMessageChgHost(Module *creator) : IRCDMessage(creator, "CHGHOST", 2) { } - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) override { User *u = User::Find(params[0]); if (u) @@ -821,7 +821,7 @@ struct IRCDMessageChgIdent : IRCDMessage { IRCDMessageChgIdent(Module *creator) : IRCDMessage(creator, "CHGIDENT", 2) { } - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) override { User *u = User::Find(params[0]); if (u) @@ -833,7 +833,7 @@ struct IRCDMessageChgName : IRCDMessage { IRCDMessageChgName(Module *creator) : IRCDMessage(creator, "CHGNAME", 2) { } - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) override { User *u = User::Find(params[0]); if (u) @@ -845,7 +845,7 @@ struct IRCDMessageMD : IRCDMessage { IRCDMessageMD(Module *creator) : IRCDMessage(creator, "MD", 3) { SetFlag(IRCDMESSAGE_SOFT_LIMIT); } - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) override { const Anope::string &mdtype = params[0], &obj = params[1], @@ -873,7 +873,7 @@ struct IRCDMessageMode : IRCDMessage { IRCDMessageMode(Module *creator, const Anope::string &mname) : IRCDMessage(creator, mname, 2) { SetFlag(IRCDMESSAGE_SOFT_LIMIT); } - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) override { bool server_source = source.GetServer() != NULL; Anope::string modes = params[1]; @@ -918,7 +918,7 @@ struct IRCDMessageNetInfo : IRCDMessage { IRCDMessageNetInfo(Module *creator) : IRCDMessage(creator, "NETINFO", 8) { SetFlag(IRCDMESSAGE_REQUIRE_SERVER); } - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) override { UplinkSocket::Message() << "NETINFO " << MaxUserCount << " " << Anope::CurTime << " " << convertTo<int>(params[2]) << " " << params[3] << " 0 0 0 :" << params[7]; } @@ -948,7 +948,7 @@ struct IRCDMessageNick : IRCDMessage ** parv[0] = new nickname ** parv[1] = hopcount */ - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) override { if (params.size() == 11) { @@ -1014,7 +1014,7 @@ struct IRCDMessagePong : IRCDMessage { IRCDMessagePong(Module *creator) : IRCDMessage(creator, "PONG", 0) { SetFlag(IRCDMESSAGE_SOFT_LIMIT); SetFlag(IRCDMESSAGE_REQUIRE_SERVER); } - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) override { if (!source.GetServer()->IsSynced()) source.GetServer()->Sync(false); @@ -1025,7 +1025,7 @@ struct IRCDMessageSASL : IRCDMessage { IRCDMessageSASL(Module *creator) : IRCDMessage(creator, "SASL", 4) { SetFlag(IRCDMESSAGE_SOFT_LIMIT); SetFlag(IRCDMESSAGE_REQUIRE_SERVER); } - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) override { if (!SASL::sasl) return; @@ -1045,7 +1045,7 @@ struct IRCDMessageSDesc : IRCDMessage { IRCDMessageSDesc(Module *creator) : IRCDMessage(creator, "SDESC", 1) { SetFlag(IRCDMESSAGE_REQUIRE_SERVER); } - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) override { source.GetServer()->SetDescription(params[0]); } @@ -1055,7 +1055,7 @@ struct IRCDMessageSetHost : IRCDMessage { IRCDMessageSetHost(Module *creator) : IRCDMessage(creator, "SETHOST", 1) { SetFlag(IRCDMESSAGE_REQUIRE_USER); } - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) override { User *u = source.GetUser(); @@ -1071,7 +1071,7 @@ struct IRCDMessageSetIdent : IRCDMessage { IRCDMessageSetIdent(Module *creator) : IRCDMessage(creator, "SETIDENT", 1) { SetFlag(IRCDMESSAGE_REQUIRE_USER); } - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) override { User *u = source.GetUser(); u->SetVIdent(params[0]); @@ -1082,7 +1082,7 @@ struct IRCDMessageSetName : IRCDMessage { IRCDMessageSetName(Module *creator) : IRCDMessage(creator, "SETNAME", 1) { SetFlag(IRCDMESSAGE_REQUIRE_USER); } - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) override { User *u = source.GetUser(); u->SetRealname(params[0]); @@ -1093,7 +1093,7 @@ struct IRCDMessageServer : IRCDMessage { IRCDMessageServer(Module *creator) : IRCDMessage(creator, "SERVER", 3) { SetFlag(IRCDMESSAGE_REQUIRE_SERVER); } - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) override { unsigned int hops = Anope::string(params[1]).is_pos_number_only() ? convertTo<unsigned>(params[1]) : 0; @@ -1115,7 +1115,7 @@ struct IRCDMessageSID : IRCDMessage { IRCDMessageSID(Module *creator) : IRCDMessage(creator, "SID", 4) { SetFlag(IRCDMESSAGE_REQUIRE_SERVER); } - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) override { unsigned int hops = Anope::string(params[1]).is_pos_number_only() ? convertTo<unsigned>(params[1]) : 0; @@ -1129,7 +1129,7 @@ struct IRCDMessageSJoin : IRCDMessage { IRCDMessageSJoin(Module *creator) : IRCDMessage(creator, "SJOIN", 3) { SetFlag(IRCDMESSAGE_REQUIRE_SERVER); SetFlag(IRCDMESSAGE_SOFT_LIMIT); } - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) override { Anope::string modes; if (params.size() >= 4) @@ -1223,7 +1223,7 @@ struct IRCDMessageTopic : IRCDMessage ** parv[2] = topic time ** parv[3] = topic text */ - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) override { Channel *c = Channel::Find(params[0]); if (c) @@ -1249,7 +1249,7 @@ struct IRCDMessageUID : IRCDMessage { IRCDMessageUID(Module *creator) : IRCDMessage(creator, "UID", 12) { SetFlag(IRCDMESSAGE_REQUIRE_SERVER); } - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) override { Anope::string nickname = params[0], @@ -1318,7 +1318,7 @@ struct IRCDMessageUmode2 : IRCDMessage { IRCDMessageUmode2(Module *creator) : IRCDMessage(creator, "UMODE2", 1) { SetFlag(IRCDMESSAGE_REQUIRE_USER); } - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) override { source.GetUser()->SetModesInternal(source, "%s", params[0].c_str()); } @@ -1422,24 +1422,24 @@ class ProtoUnreal : public Module this->AddModes(); } - void Prioritize() anope_override + void Prioritize() override { ModuleManager::SetPriority(this, PRIORITY_FIRST); } - void OnReload(Configuration::Conf *conf) anope_override + void OnReload(Configuration::Conf *conf) override { use_server_side_mlock = conf->GetModule(this)->Get<bool>("use_server_side_mlock"); } - void OnUserNickChange(User *u, const Anope::string &) anope_override + void OnUserNickChange(User *u, const Anope::string &) override { u->RemoveModeInternal(Me, ModeManager::FindUserModeByName("REGISTERED")); if (Servers::Capab.count("ESVID") == 0) IRCD->SendLogout(u); } - void OnChannelSync(Channel *c) anope_override + void OnChannelSync(Channel *c) override { if (!c->ci) return; @@ -1452,7 +1452,7 @@ class ProtoUnreal : public Module } } - void OnChanRegistered(ChannelInfo *ci) anope_override + void OnChanRegistered(ChannelInfo *ci) override { ModeLocks *modelocks = ci->GetExt<ModeLocks>("modelocks"); if (!ci->c || !use_server_side_mlock || !modelocks || !Servers::Capab.count("MLOCK")) @@ -1461,14 +1461,14 @@ class ProtoUnreal : public Module UplinkSocket::Message(Me) << "MLOCK " << static_cast<long>(ci->c->creation_time) << " " << ci->name << " " << modes; } - void OnDelChan(ChannelInfo *ci) anope_override + void OnDelChan(ChannelInfo *ci) override { if (!ci->c || !use_server_side_mlock || !Servers::Capab.count("MLOCK")) return; UplinkSocket::Message(Me) << "MLOCK " << static_cast<long>(ci->c->creation_time) << " " << ci->name << " :"; } - EventReturn OnMLock(ChannelInfo *ci, ModeLock *lock) anope_override + EventReturn OnMLock(ChannelInfo *ci, ModeLock *lock) override { ModeLocks *modelocks = ci->GetExt<ModeLocks>("modelocks"); ChannelMode *cm = ModeManager::FindChannelModeByName(lock->name); @@ -1481,7 +1481,7 @@ class ProtoUnreal : public Module return EVENT_CONTINUE; } - EventReturn OnUnMLock(ChannelInfo *ci, ModeLock *lock) anope_override + EventReturn OnUnMLock(ChannelInfo *ci, ModeLock *lock) override { ModeLocks *modelocks = ci->GetExt<ModeLocks>("modelocks"); ChannelMode *cm = ModeManager::FindChannelModeByName(lock->name); |