]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_spanningtree/main.cpp
Convert AWAY to use cross-module events and clean up slightly.
[user/henk/code/inspircd.git] / src / modules / m_spanningtree / main.cpp
index c7e55c66cf3259e784969b03c4b4e956f74675db..3c90891156153fe5a9ca25dd4f41a4305e5f13d6 100644 (file)
@@ -37,7 +37,8 @@
 #include "translate.h"
 
 ModuleSpanningTree::ModuleSpanningTree()
-       : Stats::EventListener(this)
+       : Away::EventListener(this)
+       , Stats::EventListener(this)
        , rconnect(this)
        , rsquit(this)
        , map(this)
@@ -718,12 +719,16 @@ void ModuleSpanningTree::OnDelLine(User* user, XLine *x)
        params.Broadcast();
 }
 
-ModResult ModuleSpanningTree::OnSetAway(User* user, const std::string &awaymsg)
+void ModuleSpanningTree::OnUserAway(User* user)
 {
        if (IS_LOCAL(user))
-               CommandAway::Builder(user, awaymsg).Broadcast();
+               CommandAway::Builder(user).Broadcast();
+}
 
-       return MOD_RES_PASSTHRU;
+void ModuleSpanningTree::OnUserBack(User* user)
+{
+       if (IS_LOCAL(user))
+               CommandAway::Builder(user).Broadcast();
 }
 
 void ModuleSpanningTree::OnMode(User* source, User* u, Channel* c, const Modes::ChangeList& modes, ModeParser::ModeProcessFlag processflags, const std::string& output_mode)