diff options
author | Peter Powell <petpow@saberuk.com> | 2013-04-30 08:38:33 +0100 |
---|---|---|
committer | Peter Powell <petpow@saberuk.com> | 2013-05-15 21:41:36 +0100 |
commit | 4ab1c43c1eee708fc50a4808f714a731891b75e8 (patch) | |
tree | d9cf047483dd4bf6c21c9465ae51e842ca1e7b50 /src/modules/m_spanningtree | |
parent | e586aaab7c4f7b03514c83451d73b73f55dc6998 (diff) |
Tidy up keywords on module methods.
- Remove virtual keyword from a ton of methods which don't need it.
- Add override keyword to a ton of methods which do need it.
Diffstat (limited to 'src/modules/m_spanningtree')
-rw-r--r-- | src/modules/m_spanningtree/cachetimer.h | 2 | ||||
-rw-r--r-- | src/modules/m_spanningtree/main.h | 64 | ||||
-rw-r--r-- | src/modules/m_spanningtree/protocolinterface.h | 23 | ||||
-rw-r--r-- | src/modules/m_spanningtree/resolvers.h | 8 | ||||
-rw-r--r-- | src/modules/m_spanningtree/treesocket.h | 8 |
5 files changed, 52 insertions, 53 deletions
diff --git a/src/modules/m_spanningtree/cachetimer.h b/src/modules/m_spanningtree/cachetimer.h index 5d2278cd6..ab6dcdf09 100644 --- a/src/modules/m_spanningtree/cachetimer.h +++ b/src/modules/m_spanningtree/cachetimer.h @@ -31,5 +31,5 @@ class CacheRefreshTimer : public Timer SpanningTreeUtilities *Utils; public: CacheRefreshTimer(SpanningTreeUtilities* Util); - virtual bool Tick(time_t TIME); + bool Tick(time_t TIME); }; diff --git a/src/modules/m_spanningtree/main.h b/src/modules/m_spanningtree/main.h index 3ff369ea6..9ea48aaea 100644 --- a/src/modules/m_spanningtree/main.h +++ b/src/modules/m_spanningtree/main.h @@ -67,7 +67,7 @@ class ModuleSpanningTree : public Module /** Constructor */ ModuleSpanningTree(); - void init(); + void init() CXX11_OVERRIDE; /** Shows /LINKS */ @@ -141,41 +141,41 @@ class ModuleSpanningTree : public Module ** *** MODULE EVENTS *** **/ - ModResult OnPreCommand(std::string &command, std::vector<std::string>& parameters, LocalUser *user, bool validated, const std::string &original_line); - void OnPostCommand(const std::string &command, const std::vector<std::string>& parameters, LocalUser *user, CmdResult result, const std::string &original_line); - void OnGetServerDescription(const std::string &servername,std::string &description); - void OnUserConnect(LocalUser* source); - void OnUserInvite(User* source,User* dest,Channel* channel, time_t); - void OnPostTopicChange(User* user, Channel* chan, const std::string &topic); - void OnWallops(User* user, const std::string &text); - void OnUserNotice(User* user, void* dest, int target_type, const std::string &text, char status, const CUList &exempt_list); - void OnUserMessage(User* user, void* dest, int target_type, const std::string &text, char status, const CUList &exempt_list); - void OnBackgroundTimer(time_t curtime); - void OnUserJoin(Membership* memb, bool sync, bool created, CUList& excepts); - void OnChangeHost(User* user, const std::string &newhost); - void OnChangeName(User* user, const std::string &gecos); - void OnChangeIdent(User* user, const std::string &ident); - void OnUserPart(Membership* memb, std::string &partmessage, CUList& excepts); - void OnUserQuit(User* user, const std::string &reason, const std::string &oper_message); - void OnUserPostNick(User* user, const std::string &oldnick); - void OnUserKick(User* source, Membership* memb, const std::string &reason, CUList& excepts); - void OnRemoteKill(User* source, User* dest, const std::string &reason, const std::string &operreason); - void OnPreRehash(User* user, const std::string ¶meter); - void OnRehash(User* user); - void OnOper(User* user, const std::string &opertype); + ModResult OnPreCommand(std::string &command, std::vector<std::string>& parameters, LocalUser *user, bool validated, const std::string &original_line) CXX11_OVERRIDE; + void OnPostCommand(const std::string &command, const std::vector<std::string>& parameters, LocalUser *user, CmdResult result, const std::string &original_line) CXX11_OVERRIDE; + void OnGetServerDescription(const std::string &servername,std::string &description) CXX11_OVERRIDE; + void OnUserConnect(LocalUser* source) CXX11_OVERRIDE; + void OnUserInvite(User* source,User* dest,Channel* channel, time_t) CXX11_OVERRIDE; + void OnPostTopicChange(User* user, Channel* chan, const std::string &topic) CXX11_OVERRIDE; + void OnWallops(User* user, const std::string &text) CXX11_OVERRIDE; + void OnUserNotice(User* user, void* dest, int target_type, const std::string &text, char status, const CUList &exempt_list) CXX11_OVERRIDE; + void OnUserMessage(User* user, void* dest, int target_type, const std::string &text, char status, const CUList &exempt_list) CXX11_OVERRIDE; + void OnBackgroundTimer(time_t curtime) CXX11_OVERRIDE; + void OnUserJoin(Membership* memb, bool sync, bool created, CUList& excepts) CXX11_OVERRIDE; + void OnChangeHost(User* user, const std::string &newhost) CXX11_OVERRIDE; + void OnChangeName(User* user, const std::string &gecos) CXX11_OVERRIDE; + void OnChangeIdent(User* user, const std::string &ident) CXX11_OVERRIDE; + void OnUserPart(Membership* memb, std::string &partmessage, CUList& excepts) CXX11_OVERRIDE; + void OnUserQuit(User* user, const std::string &reason, const std::string &oper_message) CXX11_OVERRIDE; + void OnUserPostNick(User* user, const std::string &oldnick) CXX11_OVERRIDE; + void OnUserKick(User* source, Membership* memb, const std::string &reason, CUList& excepts) CXX11_OVERRIDE; + void OnRemoteKill(User* source, User* dest, const std::string &reason, const std::string &operreason) CXX11_OVERRIDE; + void OnPreRehash(User* user, const std::string ¶meter) CXX11_OVERRIDE; + void OnRehash(User* user) CXX11_OVERRIDE; + void OnOper(User* user, const std::string &opertype) CXX11_OVERRIDE; void OnLine(User* source, const std::string &host, bool adding, char linetype, long duration, const std::string &reason); - void OnAddLine(User *u, XLine *x); - void OnDelLine(User *u, XLine *x); - void OnMode(User* user, void* dest, int target_type, const std::vector<std::string> &text, const std::vector<TranslateType> &translate); - ModResult OnStats(char statschar, User* user, string_list &results); - ModResult OnSetAway(User* user, const std::string &awaymsg); + void OnAddLine(User *u, XLine *x) CXX11_OVERRIDE; + void OnDelLine(User *u, XLine *x) CXX11_OVERRIDE; + void OnMode(User* user, void* dest, int target_type, const std::vector<std::string> &text, const std::vector<TranslateType> &translate) CXX11_OVERRIDE; + ModResult OnStats(char statschar, User* user, string_list &results) CXX11_OVERRIDE; + ModResult OnSetAway(User* user, const std::string &awaymsg) CXX11_OVERRIDE; void ProtoSendMode(void* opaque, TargetTypeFlags target_type, void* target, const std::vector<std::string> &modeline, const std::vector<TranslateType> &translate); void ProtoSendMetaData(void* opaque, Extensible* target, const std::string &extname, const std::string &extdata); - void OnLoadModule(Module* mod); - void OnUnloadModule(Module* mod); - ModResult OnAcceptConnection(int newsock, ListenSocket* from, irc::sockets::sockaddrs* client, irc::sockets::sockaddrs* server); + void OnLoadModule(Module* mod) CXX11_OVERRIDE; + void OnUnloadModule(Module* mod) CXX11_OVERRIDE; + ModResult OnAcceptConnection(int newsock, ListenSocket* from, irc::sockets::sockaddrs* client, irc::sockets::sockaddrs* server) CXX11_OVERRIDE; CullResult cull(); ~ModuleSpanningTree(); - Version GetVersion(); + Version GetVersion() CXX11_OVERRIDE; void Prioritize(); }; diff --git a/src/modules/m_spanningtree/protocolinterface.h b/src/modules/m_spanningtree/protocolinterface.h index 2757db8da..80a21c49b 100644 --- a/src/modules/m_spanningtree/protocolinterface.h +++ b/src/modules/m_spanningtree/protocolinterface.h @@ -28,17 +28,16 @@ class SpanningTreeProtocolInterface : public ProtocolInterface void SendChannel(Channel* target, char status, const std::string &text); public: SpanningTreeProtocolInterface(SpanningTreeUtilities* util) : Utils(util) { } - virtual ~SpanningTreeProtocolInterface() { } - virtual bool SendEncapsulatedData(const parameterlist &encap); - virtual void SendMetaData(Extensible* target, const std::string &key, const std::string &data); - virtual void SendTopic(Channel* channel, std::string &topic); - virtual void SendMode(const std::string &target, const parameterlist &modedata, const std::vector<TranslateType> &types); - virtual void SendSNONotice(const std::string &snomask, const std::string &text); - virtual void PushToClient(User* target, const std::string &rawline); - virtual void SendChannelPrivmsg(Channel* target, char status, const std::string &text); - virtual void SendChannelNotice(Channel* target, char status, const std::string &text); - virtual void SendUserPrivmsg(User* target, const std::string &text); - virtual void SendUserNotice(User* target, const std::string &text); - virtual void GetServerList(ProtoServerList &sl); + bool SendEncapsulatedData(const parameterlist &encap); + void SendMetaData(Extensible* target, const std::string &key, const std::string &data); + void SendTopic(Channel* channel, std::string &topic); + void SendMode(const std::string &target, const parameterlist &modedata, const std::vector<TranslateType> &types); + void SendSNONotice(const std::string &snomask, const std::string &text); + void PushToClient(User* target, const std::string &rawline); + void SendChannelPrivmsg(Channel* target, char status, const std::string &text); + void SendChannelNotice(Channel* target, char status, const std::string &text); + void SendUserPrivmsg(User* target, const std::string &text); + void SendUserNotice(User* target, const std::string &text); + void GetServerList(ProtoServerList &sl); }; diff --git a/src/modules/m_spanningtree/resolvers.h b/src/modules/m_spanningtree/resolvers.h index 83aaf8db0..249414617 100644 --- a/src/modules/m_spanningtree/resolvers.h +++ b/src/modules/m_spanningtree/resolvers.h @@ -38,8 +38,8 @@ class SecurityIPResolver : public DNS::Request DNS::QueryType query; public: SecurityIPResolver(Module* me, SpanningTreeUtilities* U, DNS::Manager *mgr, const std::string &hostname, Link* x, DNS::QueryType qt); - void OnLookupComplete(const DNS::Query *r); - void OnError(const DNS::Query *q); + void OnLookupComplete(const DNS::Query *r) CXX11_OVERRIDE; + void OnError(const DNS::Query *q) CXX11_OVERRIDE; }; /** This class is used to resolve server hostnames during /connect and autoconnect. @@ -58,6 +58,6 @@ class ServernameResolver : public DNS::Request reference<Autoconnect> myautoconnect; public: ServernameResolver(SpanningTreeUtilities* Util, DNS::Manager *mgr, const std::string &hostname, Link* x, DNS::QueryType qt, Autoconnect* myac); - void OnLookupComplete(const DNS::Query *r); - void OnError(const DNS::Query *q); + void OnLookupComplete(const DNS::Query *r) CXX11_OVERRIDE; + void OnError(const DNS::Query *q) CXX11_OVERRIDE; }; diff --git a/src/modules/m_spanningtree/treesocket.h b/src/modules/m_spanningtree/treesocket.h index 0a519041c..0dcdc830e 100644 --- a/src/modules/m_spanningtree/treesocket.h +++ b/src/modules/m_spanningtree/treesocket.h @@ -163,11 +163,11 @@ class TreeSocket : public BufferedSocket * to server docs on the inspircd.org site, the other side * will then send back its own server string. */ - virtual void OnConnected(); + void OnConnected(); /** Handle socket error event */ - virtual void OnError(BufferedSocketError e); + void OnError(BufferedSocketError e) CXX11_OVERRIDE; /** Sends an error to the remote server, and displays it locally to show * that it was sent. @@ -312,10 +312,10 @@ class TreeSocket : public BufferedSocket /** Handle socket timeout from connect() */ - virtual void OnTimeout(); + void OnTimeout(); /** Handle server quit on close */ - virtual void Close(); + void Close(); /** Returns true if this server was introduced to the rest of the network */ |