summaryrefslogtreecommitdiff
path: root/src/modules/m_spanningtree/main.h
diff options
context:
space:
mode:
authorPeter Powell <petpow@saberuk.com>2018-08-12 14:56:27 +0100
committerPeter Powell <petpow@saberuk.com>2018-08-12 15:01:45 +0100
commitba23c2b115ad3bf2632179d283165c1579332fd8 (patch)
tree992b199acb6e10e75ab18422147de1cf377a65b4 /src/modules/m_spanningtree/main.h
parentf8a9b6ba4ae0b4b3c7b2a408332230dd82eb4608 (diff)
Convert AWAY to use cross-module events and clean up slightly.
OnSetAway has been replaced with four events. OnUserPreAway and OnUserPreBack can be used to deny an away state change and/or change the away message of a local user. OnUserAway and OnUserBack allow modules to be notified that a user's away state has changed.
Diffstat (limited to 'src/modules/m_spanningtree/main.h')
-rw-r--r--src/modules/m_spanningtree/main.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/modules/m_spanningtree/main.h b/src/modules/m_spanningtree/main.h
index 34b657720..4a65f1c37 100644
--- a/src/modules/m_spanningtree/main.h
+++ b/src/modules/m_spanningtree/main.h
@@ -53,7 +53,10 @@ class Autoconnect;
/** This is the main class for the spanningtree module
*/
-class ModuleSpanningTree : public Module, public Stats::EventListener
+class ModuleSpanningTree
+ : public Module
+ , public Away::EventListener
+ , public Stats::EventListener
{
/** Client to server commands, registered in the core
*/
@@ -164,7 +167,8 @@ class ModuleSpanningTree : public Module, public Stats::EventListener
void OnAddLine(User *u, XLine *x) CXX11_OVERRIDE;
void OnDelLine(User *u, XLine *x) CXX11_OVERRIDE;
ModResult OnStats(Stats::Context& stats) CXX11_OVERRIDE;
- ModResult OnSetAway(User* user, const std::string &awaymsg) CXX11_OVERRIDE;
+ void OnUserAway(User* user) CXX11_OVERRIDE;
+ void OnUserBack(User* user) CXX11_OVERRIDE;
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;