From ee5cd8493e34a1c049066ead25e9094b30cd49b5 Mon Sep 17 00:00:00 2001 From: Adam Date: Sat, 18 Feb 2012 15:04:26 -0500 Subject: Use C++11's explicit override feature if available --- modules/protocol/inspircd-ts6.h | 74 ++++++++++++++++++++--------------------- 1 file changed, 37 insertions(+), 37 deletions(-) (limited to 'modules/protocol/inspircd-ts6.h') diff --git a/modules/protocol/inspircd-ts6.h b/modules/protocol/inspircd-ts6.h index a13104d78..8ba879c4c 100644 --- a/modules/protocol/inspircd-ts6.h +++ b/modules/protocol/inspircd-ts6.h @@ -14,7 +14,7 @@ class ChannelModeFlood : public ChannelModeParam public: ChannelModeFlood(char modeChar, bool minusNoArg) : ChannelModeParam(CMODE_FLOOD, modeChar, minusNoArg) { } - bool IsValid(const Anope::string &value) const + bool IsValid(const Anope::string &value) const anope_override { try { @@ -49,18 +49,18 @@ class InspIRCdTS6Proto : public IRCDProto public: - void SendAkillDel(const XLine *x) + void SendAkillDel(const XLine *x) anope_override { BotInfo *bi = findbot(Config->OperServ); UplinkSocket::Message(bi ? bi->GetUID() : Config->Numeric) << "GLINE " << x->Mask; } - void SendTopic(BotInfo *whosets, Channel *c) + void SendTopic(BotInfo *whosets, Channel *c) anope_override { UplinkSocket::Message(whosets->GetUID()) << "FTOPIC " << c->name << " " << Anope::CurTime << " " << c->topic_setter << " :" << c->topic; } - void SendVhostDel(User *u) + void SendVhostDel(User *u) anope_override { if (u->HasMode(UMODE_CLOAK)) this->SendChgHostInternal(u->nick, u->chost); @@ -71,7 +71,7 @@ class InspIRCdTS6Proto : public IRCDProto this->SendChgIdentInternal(u->nick, u->GetIdent()); } - void SendAkill(User *, const XLine *x) + void SendAkill(User *, const XLine *x) anope_override { // Calculate the time left before this would expire, capping it at 2 days time_t timeleft = x->Expires - Anope::CurTime; @@ -81,33 +81,33 @@ class InspIRCdTS6Proto : public IRCDProto UplinkSocket::Message(u ? u->GetUID() : Config->Numeric) << "ADDLINE G " << x->GetUser() << "@" << x->GetHost() << " " << x->By << " " << Anope::CurTime << " " << timeleft << " :" << x->Reason; } - void SendSVSKillInternal(const BotInfo *source, const User *user, const Anope::string &buf) + void SendSVSKillInternal(const BotInfo *source, const User *user, const Anope::string &buf) anope_override { UplinkSocket::Message(source ? source->GetUID() : Config->Numeric) << "KILL " << user->GetUID() << " :" << buf; } - void SendNumericInternal(const Anope::string &source, int numeric, const Anope::string &dest, const Anope::string &buf) + void SendNumericInternal(const Anope::string &source, int numeric, const Anope::string &dest, const Anope::string &buf) anope_override { UplinkSocket::Message(Config->Numeric) << "PUSH " << dest << " ::" << source << " " << numeric << " " << dest << " " << buf; } - void SendModeInternal(const BotInfo *source, const Channel *dest, const Anope::string &buf) + void SendModeInternal(const BotInfo *source, const Channel *dest, const Anope::string &buf) anope_override { UplinkSocket::Message(source ? source->GetUID() : Config->Numeric) << "FMODE " << dest->name << " " << dest->creation_time << " " << buf; } - void SendModeInternal(const BotInfo *bi, const User *u, const Anope::string &buf) + void SendModeInternal(const BotInfo *bi, const User *u, const Anope::string &buf) anope_override { UplinkSocket::Message(bi ? bi->GetUID() : Config->Numeric) << "MODE " << u->GetUID() << " " << buf; } - void SendClientIntroduction(const User *u) + void SendClientIntroduction(const User *u) anope_override { Anope::string modes = "+" + u->GetModes(); UplinkSocket::Message(Config->Numeric) << "UID " << u->GetUID() << " " << u->timestamp << " " << u->nick << " " << u->host << " " << u->host << " " << u->GetIdent() << " 0.0.0.0 " << u->my_signon << " " << modes << " :" << u->realname; } - void SendKickInternal(const BotInfo *source, const Channel *chan, const User *user, const Anope::string &buf) + void SendKickInternal(const BotInfo *source, const Channel *chan, const User *user, const Anope::string &buf) anope_override { if (!buf.empty()) UplinkSocket::Message(source->GetUID()) << "KICK " << chan->name << " " << user->GetUID() << " :" << buf; @@ -116,13 +116,13 @@ class InspIRCdTS6Proto : public IRCDProto } /* SERVER services-dev.chatspike.net password 0 :Description here */ - void SendServer(const Server *server) + void SendServer(const Server *server) anope_override { UplinkSocket::Message("") << "SERVER " << server->GetName() << " " << Config->Uplinks[CurrentUplink]->password << " " << server->GetHops() << " " << server->GetSID() << " :" << server->GetDescription(); } /* JOIN */ - void SendJoin(User *user, Channel *c, const ChannelStatus *status) + void SendJoin(User *user, Channel *c, const ChannelStatus *status) anope_override { UplinkSocket::Message(Config->Numeric) << "FJOIN " << c->name << " " << c->creation_time << " +" << c->GetModes(true, true) << " :," << user->GetUID(); /* Note that we can send this with the FJOIN but choose not to @@ -148,13 +148,13 @@ class InspIRCdTS6Proto : public IRCDProto } /* UNSQLINE */ - void SendSQLineDel(const XLine *x) + void SendSQLineDel(const XLine *x) anope_override { UplinkSocket::Message(Config->Numeric) << "DELLINE Q " << x->Mask; } /* SQLINE */ - void SendSQLine(User *, const XLine *x) + void SendSQLine(User *, const XLine *x) anope_override { // Calculate the time left before this would expire, capping it at 2 days time_t timeleft = x->Expires - Anope::CurTime; @@ -165,7 +165,7 @@ class InspIRCdTS6Proto : public IRCDProto /* Functions that use serval cmd functions */ - void SendVhost(User *u, const Anope::string &vIdent, const Anope::string &vhost) + void SendVhost(User *u, const Anope::string &vIdent, const Anope::string &vhost) anope_override { if (!vIdent.empty()) this->SendChgIdentInternal(u->nick, vIdent); @@ -173,7 +173,7 @@ class InspIRCdTS6Proto : public IRCDProto this->SendChgHostInternal(u->nick, vhost); } - void SendConnect() + void SendConnect() anope_override { SendServer(Me); UplinkSocket::Message(Config->Numeric) << "BURST"; @@ -182,7 +182,7 @@ class InspIRCdTS6Proto : public IRCDProto } /* SVSHOLD - set */ - void SendSVSHold(const Anope::string &nick) + void SendSVSHold(const Anope::string &nick) anope_override { BotInfo *bi = findbot(Config->NickServ); if (bi) @@ -190,7 +190,7 @@ class InspIRCdTS6Proto : public IRCDProto } /* SVSHOLD - release */ - void SendSVSHoldDel(const Anope::string &nick) + void SendSVSHoldDel(const Anope::string &nick) anope_override { BotInfo *bi = findbot(Config->NickServ); if (bi) @@ -198,13 +198,13 @@ class InspIRCdTS6Proto : public IRCDProto } /* UNSZLINE */ - void SendSZLineDel(const XLine *x) + void SendSZLineDel(const XLine *x) anope_override { UplinkSocket::Message(Config->Numeric) << "DELLINE Z " << x->GetHost(); } /* SZLINE */ - void SendSZLine(User *, const XLine *x) + void SendSZLine(User *, const XLine *x) anope_override { // Calculate the time left before this would expire, capping it at 2 days time_t timeleft = x->Expires - Anope::CurTime; @@ -213,26 +213,26 @@ class InspIRCdTS6Proto : public IRCDProto UplinkSocket::Message(Config->Numeric) << "ADDLINE Z " << x->GetHost() << " " << x->By << " " << Anope::CurTime << " " << timeleft <<" :" << x->Reason; } - void SendSVSJoin(const Anope::string &source, const Anope::string &nick, const Anope::string &chan, const Anope::string &) + void SendSVSJoin(const Anope::string &source, const Anope::string &nick, const Anope::string &chan, const Anope::string &) anope_override { User *u = finduser(nick); BotInfo *bi = findbot(source); UplinkSocket::Message(bi->GetUID()) << "SVSJOIN " << u->GetUID() << " " << chan; } - void SendSWhois(const Anope::string &, const Anope::string &who, const Anope::string &mask) + void SendSWhois(const Anope::string &, const Anope::string &who, const Anope::string &mask) anope_override { User *u = finduser(who); UplinkSocket::Message(Config->Numeric) << "METADATA " << u->GetUID() << " swhois :" << mask; } - void SendBOB() + void SendBOB() anope_override { UplinkSocket::Message(Config->Numeric) << "BURST " << Anope::CurTime; } - void SendEOB() + void SendEOB() anope_override { UplinkSocket::Message(Config->Numeric) << "ENDBURST"; } @@ -245,7 +245,7 @@ class InspIRCdTS6Proto : public IRCDProto UplinkSocket::Message(source ? source->GetUID() : Config->Numeric) << "SNONOTICE A :" << buf; } - void SendLogin(User *u) + void SendLogin(User *u) anope_override { if (!u->Account() || u->Account()->HasFlag(NI_UNCONFIRMED)) return; @@ -253,17 +253,17 @@ class InspIRCdTS6Proto : public IRCDProto UplinkSocket::Message(Config->Numeric) << "METADATA " << u->GetUID() << " accountname :" << u->Account()->display; } - void SendLogout(User *u) + void SendLogout(User *u) anope_override { UplinkSocket::Message(Config->Numeric) << "METADATA " << u->GetUID() << " accountname :"; } - void SendChannel(Channel *c) + void SendChannel(Channel *c) anope_override { UplinkSocket::Message(Config->Numeric) << "FJOIN " << c->name << " " << c->creation_time << " +" << c->GetModes(true, true) << " :"; } - bool IsNickValid(const Anope::string &nick) + bool IsNickValid(const Anope::string &nick) anope_override { /* InspIRCd, like TS6, uses UIDs on collision, so... */ if (isdigit(nick[0])) @@ -276,7 +276,7 @@ class InspIRCdTS6Proto : public IRCDProto class InspircdIRCdMessage : public IRCdMessage { public: - bool OnMode(const Anope::string &source, const std::vector ¶ms) + bool OnMode(const Anope::string &source, const std::vector ¶ms) anope_override { if (params[0][0] == '#' || params[0][0] == '&') do_cmode(source, params[0], params[2], params[1]); @@ -301,15 +301,15 @@ class InspircdIRCdMessage : public IRCdMessage return true; } - virtual bool OnUID(const Anope::string &source, const std::vector ¶ms) = 0; + virtual bool OnUID(const Anope::string &source, const std::vector ¶ms) anope_override = 0; - bool OnNick(const Anope::string &source, const std::vector ¶ms) + bool OnNick(const Anope::string &source, const std::vector ¶ms) anope_override { do_nick(source, params[0], "", "", "", "", 0, "", "", "", ""); return true; } - bool OnPrivmsg(const Anope::string &source, const std::vector ¶ms) + bool OnPrivmsg(const Anope::string &source, const std::vector ¶ms) anope_override { /* Ignore privmsgs from the server, which can happen. */ if (Server::Find(source) != NULL) @@ -326,13 +326,13 @@ class InspircdIRCdMessage : public IRCdMessage * 3: numeric * 4: desc */ - bool OnServer(const Anope::string &source, const std::vector ¶ms) + bool OnServer(const Anope::string &source, const std::vector ¶ms) anope_override { do_server(source, params[0], Anope::string(params[2]).is_pos_number_only() ? convertTo(params[2]) : 0, params[4], params[3]); return true; } - bool OnTopic(const Anope::string &source, const std::vector ¶ms) + bool OnTopic(const Anope::string &source, const std::vector ¶ms) anope_override { Channel *c = findchan(params[0]); @@ -347,9 +347,9 @@ class InspircdIRCdMessage : public IRCdMessage return true; } - virtual bool OnCapab(const Anope::string &, const std::vector &) = 0; + virtual bool OnCapab(const Anope::string &, const std::vector &) anope_override = 0; - bool OnSJoin(const Anope::string &source, const std::vector ¶ms) + bool OnSJoin(const Anope::string &source, const std::vector ¶ms) anope_override { Channel *c = findchan(params[0]); time_t ts = Anope::string(params[1]).is_pos_number_only() ? convertTo(params[1]) : 0; -- cgit