summaryrefslogtreecommitdiff
path: root/src/cmd_version.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd_version.cpp')
-rw-r--r--src/cmd_version.cpp28
1 files changed, 17 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;
+ }
+ }
}