]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_spanningtree/netburst.cpp
Replace all abstract usages of his/he/her with they/their/it.
[user/henk/code/inspircd.git] / src / modules / m_spanningtree / netburst.cpp
index cdafa9dedfbb86361e8005815f32a1ca11db5ae1..ed15591e9027e4267be29c977eca01e5ceaecc26 100644 (file)
@@ -27,6 +27,7 @@
 #include "treeserver.h"
 #include "main.h"
 #include "commands.h"
+#include "modules/server.h"
 
 /**
  * Creates FMODE messages, used only when syncing channels
@@ -102,7 +103,7 @@ struct TreeSocket::BurstState
  */
 void TreeSocket::DoBurst(TreeServer* s)
 {
-       ServerInstance->SNO->WriteToSnoMask('l',"Bursting to \2%s\2 (Authentication: %s%s).",
+       ServerInstance->SNO->WriteToSnoMask('l',"Bursting to \002%s\002 (Authentication: %s%s).",
                s->GetName().c_str(),
                capab->auth_fingerprint ? "SSL certificate fingerprint and " : "",
                capab->auth_challenge ? "challenge-response" : "plaintext password");
@@ -122,9 +123,9 @@ void TreeSocket::DoBurst(TreeServer* s)
 
        // Send all xlines
        this->SendXLines();
-       FOREACH_MOD(OnSyncNetwork, (bs.server));
+       FOREACH_MOD_CUSTOM(Utils->Creator->GetEventProvider(), ServerEventListener, OnSyncNetwork, (bs.server));
        this->WriteLine(CmdBuilder("ENDBURST"));
-       ServerInstance->SNO->WriteToSnoMask('l',"Finished bursting to \2"+ s->GetName()+"\2.");
+       ServerInstance->SNO->WriteToSnoMask('l',"Finished bursting to \002"+ s->GetName()+"\002.");
 
        this->burstsent = true;
 }
@@ -136,6 +137,9 @@ void TreeSocket::SendServerInfo(TreeServer* from)
 
        // Send full version string that contains more information and is shown to opers
        this->WriteLine(CommandSInfo::Builder(from, "fullversion", from->GetFullVersion()));
+
+       // Send the raw version string that just contains the base info
+       this->WriteLine(CommandSInfo::Builder(from, "rawversion", from->GetRawVersion()));
 }
 
 /** Recursively send the server tree.
@@ -261,7 +265,7 @@ void TreeSocket::SyncChannel(Channel* chan, BurstState& bs)
                        this->WriteLine(CommandMetadata::Builder(chan, item->name, value));
        }
 
-       FOREACH_MOD(OnSyncChannel, (chan, bs.server));
+       FOREACH_MOD_CUSTOM(Utils->Creator->GetEventProvider(), ServerEventListener, OnSyncChannel, (chan, bs.server));
 }
 
 void TreeSocket::SyncChannel(Channel* chan)
@@ -273,8 +277,6 @@ void TreeSocket::SyncChannel(Channel* chan)
 /** Send all users and their state, including oper and away status and global metadata */
 void TreeSocket::SendUsers(BurstState& bs)
 {
-       ProtocolInterface::Server& piserver = bs.server;
-
        const user_hash& users = ServerInstance->Users->GetUsers();
        for (user_hash::const_iterator u = users.begin(); u != users.end(); ++u)
        {
@@ -299,6 +301,6 @@ void TreeSocket::SendUsers(BurstState& bs)
                                this->WriteLine(CommandMetadata::Builder(user, item->name, value));
                }
 
-               FOREACH_MOD(OnSyncUser, (user, piserver));
+               FOREACH_MOD_CUSTOM(Utils->Creator->GetEventProvider(), ServerEventListener, OnSyncUser, (user, bs.server));
        }
 }