diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/cmd_version.cpp | 28 | ||||
-rw-r--r-- | src/modules/m_spanningtree.cpp | 19 |
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 { |