]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Added 005 stuff after VERSION
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Mon, 9 Jan 2006 01:10:10 +0000 (01:10 +0000)
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Mon, 9 Jan 2006 01:10:10 +0000 (01:10 +0000)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2745 e03df62e-2008-0410-955e-edbf42e46eb7

src/cmd_version.cpp
src/modules/m_spanningtree.cpp

index 29350734e23f23f34e8252bf0ace4dcf2e3adf35..51629cfee8beee0f215a4c39993301aa3ab9a4ab 100644 (file)
@@ -51,20 +51,26 @@ using namespace std;
 
 extern ServerConfig* Config;
 extern InspIRCd* ServerInstance;
-extern int MODCOUNT;
-extern std::vector<Module*> modules;
-extern std::vector<ircd_module*> factory;
-extern time_t TIME;
-extern user_hash clientlist;
-extern chan_hash chanlist;
-extern whowas_hash whowas;
-extern std::vector<userrec*> all_opers;
-extern std::vector<userrec*> local_users;
-extern userrec* fd_ref_table[65536];
 
 void cmd_version::Handle (char **parameters, int pcnt, userrec *user)
 {
-        WriteServ(user->fd,"351 %s :%s",user->nick,ServerInstance->GetVersionString().c_str());
+       WriteServ(user->fd,"351 %s :%s",user->nick,ServerInstance->GetVersionString().c_str());
+        std::stringstream out(Config->data005);
+        std::string token = "";
+        std::string line5 = "";
+        int token_counter = 0;
+        while (!out.eof())
+        {
+                out >> token;
+                line5 = line5 + token + " ";
+                token_counter++;
+                if ((token_counter >= 13) || (out.eof() == true))
+                {
+                        WriteServ(user->fd,"005 %s %s:are supported by this server",user->nick,line5.c_str());
+                        line5 = "";
+                        token_counter = 0;
+                }
+        }
 }
 
 
index e210263ac25c2dbb85679a733af2586acfa7da30..1e597c9104284cac16926e0a70457dfbaeb21d29 100644 (file)
@@ -2663,6 +2663,25 @@ class ModuleSpanningTree : public Module
                {
                        std::string Version = found->GetVersion();
                        WriteServ(user->fd,"351 %s :%s",user->nick,Version.c_str());
+                       if (found == TreeRoot)
+                       {
+                               std::stringstream out(Config->data005);
+                               std::string token = "";
+                               std::string line5 = "";
+                               int token_counter = 0;
+                               while (!out.eof())
+                               {
+                                       out >> token;
+                                       line5 = line5 + token + " ";   
+                                       token_counter++;
+                                       if ((token_counter >= 13) || (out.eof() == true))
+                                       {
+                                               WriteServ(user->fd,"005 %s %s:are supported by this server",user->nick,line5.c_str());
+                                               line5 = "";
+                                               token_counter = 0;
+                                       }
+                               }
+                       }
                }
                else
                {