diff options
| author | Adam <Adam@anope.org> | 2012-02-18 15:04:26 -0500 |
|---|---|---|
| committer | Adam <Adam@anope.org> | 2012-02-18 15:04:26 -0500 |
| commit | ee5cd8493e34a1c049066ead25e9094b30cd49b5 (patch) | |
| tree | 846c6dcd9bb2c4d721c6290a9b9d6b6ed880acdb /modules/pseudoclients | |
| parent | 41e8d276023e8fefc22fb89c2f81ae17b8222155 (diff) | |
Use C++11's explicit override feature if available
Diffstat (limited to 'modules/pseudoclients')
| -rw-r--r-- | modules/pseudoclients/botserv.cpp | 14 | ||||
| -rw-r--r-- | modules/pseudoclients/chanserv.cpp | 10 | ||||
| -rw-r--r-- | modules/pseudoclients/global.cpp | 10 | ||||
| -rw-r--r-- | modules/pseudoclients/hostserv.cpp | 6 | ||||
| -rw-r--r-- | modules/pseudoclients/memoserv.cpp | 16 | ||||
| -rw-r--r-- | modules/pseudoclients/nickserv.cpp | 26 | ||||
| -rw-r--r-- | modules/pseudoclients/operserv.cpp | 42 |
7 files changed, 62 insertions, 62 deletions
diff --git a/modules/pseudoclients/botserv.cpp b/modules/pseudoclients/botserv.cpp index 7a9234f6f..59edf97cc 100644 --- a/modules/pseudoclients/botserv.cpp +++ b/modules/pseudoclients/botserv.cpp @@ -31,7 +31,7 @@ class BotServCore : public Module } - void OnPrivmsg(User *u, Channel *c, Anope::string &msg) + void OnPrivmsg(User *u, Channel *c, Anope::string &msg) anope_override { if (!u || !c || !c->ci || !c->ci->bi || msg.empty()) return; @@ -100,7 +100,7 @@ class BotServCore : public Module } } - EventReturn OnPreCommand(CommandSource &source, Command *command, std::vector<Anope::string> ¶ms) + EventReturn OnPreCommand(CommandSource &source, Command *command, std::vector<Anope::string> ¶ms) anope_override { if (this->fantasy_channel != NULL) { @@ -120,7 +120,7 @@ class BotServCore : public Module return EVENT_CONTINUE; } - void OnJoinChannel(User *user, Channel *c) + void OnJoinChannel(User *user, Channel *c) anope_override { if (c->ci && c->ci->bi) { @@ -144,7 +144,7 @@ class BotServCore : public Module } } - void OnLeaveChannel(User *u, Channel *c) + void OnLeaveChannel(User *u, Channel *c) anope_override { /* Channel is persistent, it shouldn't be deleted and the service bot should stay */ if (c->HasFlag(CH_PERSIST) || (c->ci && c->ci->HasFlag(CI_PERSIST))) @@ -170,7 +170,7 @@ class BotServCore : public Module } } - EventReturn OnPreHelp(CommandSource &source, const std::vector<Anope::string> ¶ms) + EventReturn OnPreHelp(CommandSource &source, const std::vector<Anope::string> ¶ms) anope_override { if (!params.empty() || source.owner->nick != Config->BotServ) return EVENT_CONTINUE; @@ -186,7 +186,7 @@ class BotServCore : public Module return EVENT_CONTINUE; } - void OnPostHelp(CommandSource &source, const std::vector<Anope::string> ¶ms) + void OnPostHelp(CommandSource &source, const std::vector<Anope::string> ¶ms) anope_override { if (!params.empty() || source.owner->nick != Config->BotServ) return; @@ -199,7 +199,7 @@ class BotServCore : public Module "name with one of the following characters: %s."), Config->ChanServ.c_str(), Config->BSFantasyCharacter.c_str()); } - EventReturn OnChannelModeSet(Channel *c, ChannelModeName Name, const Anope::string ¶m) + EventReturn OnChannelModeSet(Channel *c, ChannelModeName Name, const Anope::string ¶m) anope_override { if (Config->BSSmartJoin && Name == CMODE_BAN && c->ci && c->ci->bi && c->FindUser(c->ci->bi)) { diff --git a/modules/pseudoclients/chanserv.cpp b/modules/pseudoclients/chanserv.cpp index 33ea10a64..b5deaf284 100644 --- a/modules/pseudoclients/chanserv.cpp +++ b/modules/pseudoclients/chanserv.cpp @@ -18,7 +18,7 @@ class ExpireCallback : public CallBack public: ExpireCallback(Module *owner) : CallBack(owner, Config->ExpireTimeout, Anope::CurTime, true) { } - void Tick(time_t) + void Tick(time_t) anope_override { if (!Config->CSExpire || noexpire || readonly) return; @@ -69,7 +69,7 @@ class ChanServCore : public Module ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation)); } - EventReturn OnBotPrivmsg(User *u, BotInfo *bi, Anope::string &message) + EventReturn OnBotPrivmsg(User *u, BotInfo *bi, Anope::string &message) anope_override { if (Config->CSOpersOnly && !u->HasMode(UMODE_OPER) && bi->nick == Config->ChanServ) { @@ -80,7 +80,7 @@ class ChanServCore : public Module return EVENT_CONTINUE; } - void OnDelCore(NickCore *nc) + void OnDelCore(NickCore *nc) anope_override { // XXX this is slightly inefficient for (registered_channel_map::const_iterator it = RegisteredChannelList.begin(), it_end = RegisteredChannelList.end(); it != it_end;) @@ -149,7 +149,7 @@ class ChanServCore : public Module } } - EventReturn OnPreHelp(CommandSource &source, const std::vector<Anope::string> ¶ms) + EventReturn OnPreHelp(CommandSource &source, const std::vector<Anope::string> ¶ms) anope_override { if (!params.empty() || source.owner->nick != Config->ChanServ) return EVENT_CONTINUE; @@ -164,7 +164,7 @@ class ChanServCore : public Module return EVENT_CONTINUE; } - void OnPostHelp(CommandSource &source, const std::vector<Anope::string> ¶ms) + void OnPostHelp(CommandSource &source, const std::vector<Anope::string> ¶ms) anope_override { if (!params.empty() || source.owner->nick != Config->ChanServ) return; diff --git a/modules/pseudoclients/global.cpp b/modules/pseudoclients/global.cpp index 33fa5cb21..1d3a2b7b1 100644 --- a/modules/pseudoclients/global.cpp +++ b/modules/pseudoclients/global.cpp @@ -27,7 +27,7 @@ class MyGlobalService : public GlobalService public: MyGlobalService(Module *m) : GlobalService(m) { } - void SendGlobal(BotInfo *sender, const Anope::string &source, const Anope::string &message) + void SendGlobal(BotInfo *sender, const Anope::string &source, const Anope::string &message) anope_override { if (Me->GetLinks().empty()) return; @@ -61,25 +61,25 @@ class GlobalCore : public Module ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation)); } - void OnRestart() + void OnRestart() anope_override { if (Config->GlobalOnCycle) global->SendGlobal(findbot(Config->Global), "", Config->GlobalOnCycleMessage); } - void OnShutdown() + void OnShutdown() anope_override { if (Config->GlobalOnCycle) global->SendGlobal(findbot(Config->Global), "", Config->GlobalOnCycleMessage); } - void OnNewServer(Server *s) + void OnNewServer(Server *s) anope_override { if (Config->GlobalOnCycle && !Config->GlobalOnCycleUP.empty()) s->Notice(findbot(Config->Global), Config->GlobalOnCycleUP); } - EventReturn OnPreHelp(CommandSource &source, const std::vector<Anope::string> ¶ms) + EventReturn OnPreHelp(CommandSource &source, const std::vector<Anope::string> ¶ms) anope_override { if (!params.empty() || source.owner->nick != Config->Global) return EVENT_CONTINUE; diff --git a/modules/pseudoclients/hostserv.cpp b/modules/pseudoclients/hostserv.cpp index ecf0ecb47..b8933ab11 100644 --- a/modules/pseudoclients/hostserv.cpp +++ b/modules/pseudoclients/hostserv.cpp @@ -31,7 +31,7 @@ class HostServCore : public Module ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation)); } - void OnNickIdentify(User *u) + void OnNickIdentify(User *u) anope_override { NickAlias *na = findnick(u->nick); if (!na || !na->HasVhost()) @@ -61,12 +61,12 @@ class HostServCore : public Module } } - void OnNickUpdate(User *u) + void OnNickUpdate(User *u) anope_override { this->OnNickIdentify(u); } - EventReturn OnPreHelp(CommandSource &source, const std::vector<Anope::string> ¶ms) + EventReturn OnPreHelp(CommandSource &source, const std::vector<Anope::string> ¶ms) anope_override { if (!params.empty() || source.owner->nick != Config->HostServ) return EVENT_CONTINUE; diff --git a/modules/pseudoclients/memoserv.cpp b/modules/pseudoclients/memoserv.cpp index 00d48b9d3..32eaa9f3f 100644 --- a/modules/pseudoclients/memoserv.cpp +++ b/modules/pseudoclients/memoserv.cpp @@ -39,7 +39,7 @@ class MyMemoServService : public MemoServService public: MyMemoServService(Module *m) : MemoServService(m) { } - MemoInfo *GetMemoInfo(const Anope::string &target, bool &ischan) + MemoInfo *GetMemoInfo(const Anope::string &target, bool &ischan) anope_override { if (!target.empty() && target[0] == '#') { @@ -59,7 +59,7 @@ class MyMemoServService : public MemoServService return NULL; } - MemoResult Send(const Anope::string &source, const Anope::string &target, const Anope::string &message, bool force) + MemoResult Send(const Anope::string &source, const Anope::string &target, const Anope::string &message, bool force) anope_override { bool ischan; MemoInfo *mi = this->GetMemoInfo(target, ischan); @@ -175,12 +175,12 @@ class MemoServCore : public Module ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation)); } - void OnNickIdentify(User *u) + void OnNickIdentify(User *u) anope_override { this->mymemoserv.Check(u); } - void OnJoinChannel(User *u, Channel *c) + void OnJoinChannel(User *u, Channel *c) anope_override { if (c->ci && c->ci->AccessFor(u).HasPriv("MEMO") && c->ci->memos.memos.size() > 0) { @@ -191,18 +191,18 @@ class MemoServCore : public Module } } - void OnUserAway(User *u, const Anope::string &message) + void OnUserAway(User *u, const Anope::string &message) anope_override { if (message.empty()) this->mymemoserv.Check(u); } - void OnNickUpdate(User *u) + void OnNickUpdate(User *u) anope_override { this->mymemoserv.Check(u); } - EventReturn OnPreHelp(CommandSource &source, const std::vector<Anope::string> ¶ms) + EventReturn OnPreHelp(CommandSource &source, const std::vector<Anope::string> ¶ms) anope_override { if (!params.empty() || source.owner->nick != Config->MemoServ) return EVENT_CONTINUE; @@ -215,7 +215,7 @@ class MemoServCore : public Module return EVENT_CONTINUE; } - void OnPostHelp(CommandSource &source, const std::vector<Anope::string> ¶ms) + void OnPostHelp(CommandSource &source, const std::vector<Anope::string> ¶ms) anope_override { if (!params.empty() || source.owner->nick != Config->MemoServ) return; diff --git a/modules/pseudoclients/nickserv.cpp b/modules/pseudoclients/nickserv.cpp index 163fcc6af..8dff653a1 100644 --- a/modules/pseudoclients/nickserv.cpp +++ b/modules/pseudoclients/nickserv.cpp @@ -57,7 +57,7 @@ class CoreExport NickServCollide : public Timer /** Called when the delay is up * @param t The current time */ - void Tick(time_t t) + void Tick(time_t t) anope_override { if (!u) return; @@ -75,7 +75,7 @@ class MyNickServService : public NickServService public: MyNickServService(Module *m) : NickServService(m) { } - void Validate(User *u) + void Validate(User *u) anope_override { NickAlias *na = findnick(u->nick); if (!na) @@ -143,7 +143,7 @@ class ExpireCallback : public CallBack public: ExpireCallback(Module *owner) : CallBack(owner, Config->ExpireTimeout, Anope::CurTime, true) { } - void Tick(time_t) + void Tick(time_t) anope_override { if (noexpire || readonly) return; @@ -201,7 +201,7 @@ class NickServCore : public Module ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation)); } - void OnDelNick(NickAlias *na) + void OnDelNick(NickAlias *na) anope_override { User *u = finduser(na->nick); if (u && u->Account() == na->nc) @@ -212,7 +212,7 @@ class NickServCore : public Module } } - void OnDelCore(NickCore *nc) + void OnDelCore(NickCore *nc) anope_override { Log(NickServ, "nick") << "deleting nickname group " << nc->display; @@ -230,12 +230,12 @@ class NickServCore : public Module nc->Users.clear(); } - void OnChangeCoreDisplay(NickCore *nc, const Anope::string &newdisplay) + void OnChangeCoreDisplay(NickCore *nc, const Anope::string &newdisplay) anope_override { Log(LOG_NORMAL, "nick", NickServ) << "Changing " << nc->display << " nickname group display to " << newdisplay; } - void OnNickIdentify(User *u) + void OnNickIdentify(User *u) anope_override { if (!Config->NoNicknameOwnership) { @@ -273,13 +273,13 @@ class NickServCore : public Module } } - void OnNickGroup(User *u, NickAlias *target) + void OnNickGroup(User *u, NickAlias *target) anope_override { if (target->nc->HasFlag(NI_UNCONFIRMED) == false) u->SetMode(NickServ, UMODE_REGISTERED); } - void OnNickUpdate(User *u) + void OnNickUpdate(User *u) anope_override { for (UChannelList::iterator it = u->chans.begin(), it_end = u->chans.end(); it != it_end; ++it) { @@ -290,7 +290,7 @@ class NickServCore : public Module } } - void OnUserNickChange(User *u, const Anope::string &oldnick) + void OnUserNickChange(User *u, const Anope::string &oldnick) anope_override { NickAlias *na = findnick(u->nick); /* If the new nick isnt registerd or its registerd and not yours */ @@ -310,13 +310,13 @@ class NickServCore : public Module } } - void OnUserModeSet(User *u, UserModeName Name) + void OnUserModeSet(User *u, UserModeName Name) anope_override { if (Name == UMODE_REGISTERED && !u->IsIdentified()) u->RemoveMode(NickServ, Name); } - EventReturn OnPreHelp(CommandSource &source, const std::vector<Anope::string> ¶ms) + EventReturn OnPreHelp(CommandSource &source, const std::vector<Anope::string> ¶ms) anope_override { if (!params.empty() || source.owner->nick != Config->NickServ) return EVENT_CONTINUE; @@ -329,7 +329,7 @@ class NickServCore : public Module return EVENT_CONTINUE; } - void OnPostHelp(CommandSource &source, const std::vector<Anope::string> ¶ms) + void OnPostHelp(CommandSource &source, const std::vector<Anope::string> ¶ms) anope_override { if (!params.empty() || source.owner->nick != Config->NickServ) return; diff --git a/modules/pseudoclients/operserv.cpp b/modules/pseudoclients/operserv.cpp index 813d9f098..aeaa7e3c7 100644 --- a/modules/pseudoclients/operserv.cpp +++ b/modules/pseudoclients/operserv.cpp @@ -20,19 +20,19 @@ class SGLineManager : public XLineManager public: SGLineManager(Module *creator) : XLineManager(creator, "xlinemanager/sgline", 'G') { } - void OnMatch(User *u, XLine *x) + void OnMatch(User *u, XLine *x) anope_override { if (u) u->Kill(Config->OperServ, x->Reason); this->Send(u, x); } - void OnExpire(XLine *x) + void OnExpire(XLine *x) anope_override { Log(OperServ, "expire/akill") << "AKILL on \2" << x->Mask << "\2 has expired"; } - void Send(User *u, XLine *x) + void Send(User *u, XLine *x) anope_override { try { @@ -49,7 +49,7 @@ class SGLineManager : public XLineManager } } - void SendDel(XLine *x) + void SendDel(XLine *x) anope_override { try { @@ -72,7 +72,7 @@ class SQLineManager : public XLineManager public: SQLineManager(Module *creator) : XLineManager(creator, "xlinemanager/sqline", 'Q') { } - void OnMatch(User *u, XLine *x) + void OnMatch(User *u, XLine *x) anope_override { if (u) { @@ -83,17 +83,17 @@ class SQLineManager : public XLineManager this->Send(u, x); } - void OnExpire(XLine *x) + void OnExpire(XLine *x) anope_override { Log(OperServ, "expire/sqline") << "SQLINE on \2" << x->Mask << "\2 has expired"; } - void Send(User *u, XLine *x) + void Send(User *u, XLine *x) anope_override { ircdproto->SendSQLine(u, x); } - void SendDel(XLine *x) + void SendDel(XLine *x) anope_override { ircdproto->SendSQLineDel(x); } @@ -113,7 +113,7 @@ class SNLineManager : public XLineManager public: SNLineManager(Module *creator) : XLineManager(creator, "xlinemanager/snline", 'N') { } - void OnMatch(User *u, XLine *x) + void OnMatch(User *u, XLine *x) anope_override { if (u) { @@ -123,22 +123,22 @@ class SNLineManager : public XLineManager this->Send(u, x); } - void OnExpire(XLine *x) + void OnExpire(XLine *x) anope_override { Log(OperServ, "expire/snline") << "SNLINE on \2" << x->Mask << "\2 has expired"; } - void Send(User *u, XLine *x) + void Send(User *u, XLine *x) anope_override { ircdproto->SendSGLine(u, x); } - void SendDel(XLine *x) + void SendDel(XLine *x) anope_override { ircdproto->SendSGLineDel(x); } - XLine *Check(User *u) + XLine *Check(User *u) anope_override { for (unsigned i = this->GetList().size(); i > 0; --i) { @@ -198,7 +198,7 @@ class OperServCore : public Module XLineManager::UnregisterXLineManager(&snlines); } - EventReturn OnBotPrivmsg(User *u, BotInfo *bi, Anope::string &message) + EventReturn OnBotPrivmsg(User *u, BotInfo *bi, Anope::string &message) anope_override { if (Config->OSOpersOnly && !u->HasMode(UMODE_OPER) && bi->nick == Config->OperServ) { @@ -210,44 +210,44 @@ class OperServCore : public Module return EVENT_CONTINUE; } - void OnServerQuit(Server *server) + void OnServerQuit(Server *server) anope_override { if (server->HasFlag(SERVER_JUPED)) Log(server, "squit", OperServ) << "Received SQUIT for juped server " << server->GetName(); } - void OnUserModeSet(User *u, UserModeName Name) + void OnUserModeSet(User *u, UserModeName Name) anope_override { if (Name == UMODE_OPER) Log(u, "oper", OperServ) << "is now an IRC operator."; } - void OnUserModeUnset(User *u, UserModeName Name) + void OnUserModeUnset(User *u, UserModeName Name) anope_override { if (Name == UMODE_OPER) Log(u, "oper", OperServ) << "is no longer an IRC operator"; } - void OnUserConnect(dynamic_reference<User> &u, bool &exempt) + void OnUserConnect(dynamic_reference<User> &u, bool &exempt) anope_override { if (u && !exempt) XLineManager::CheckAll(u); } - void OnUserNickChange(User *u, const Anope::string &oldnick) + void OnUserNickChange(User *u, const Anope::string &oldnick) anope_override { if (ircd->sqline && !u->HasMode(UMODE_OPER)) this->sqlines.Check(u); } - EventReturn OnCheckKick(User *u, ChannelInfo *ci, bool &kick) + EventReturn OnCheckKick(User *u, ChannelInfo *ci, bool &kick) anope_override { if (this->sqlines.CheckChannel(ci->c)) kick = true; return EVENT_CONTINUE; } - EventReturn OnPreHelp(CommandSource &source, const std::vector<Anope::string> ¶ms) + EventReturn OnPreHelp(CommandSource &source, const std::vector<Anope::string> ¶ms) anope_override { if (!params.empty() || source.owner->nick != Config->OperServ) return EVENT_CONTINUE; |
