summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-01-09 01:10:10 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-01-09 01:10:10 +0000
commit502998d9cb7da062ba579edb88cb996b1517fe38 (patch)
tree279e74f7953fa5574c3d2ace1c6ff1b607722d90
parentcd2d2dda8683205040e359019bdec780e369a694 (diff)
Added 005 stuff after VERSION
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2745 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--src/cmd_version.cpp28
-rw-r--r--src/modules/m_spanningtree.cpp19
2 files changed, 36 insertions, 11 deletions
diff --git a/src/cmd_version.cpp b/src/cmd_version.cpp
index 29350734e..51629cfee 100644
--- a/src/cmd_version.cpp
+++ b/src/cmd_version.cpp
@@ -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;
+ }
+ }
}
diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp
index e210263ac..1e597c910 100644
--- a/src/modules/m_spanningtree.cpp
+++ b/src/modules/m_spanningtree.cpp
@@ -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
{