diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/cmd_version.cpp | 37 |
1 files changed, 20 insertions, 17 deletions
diff --git a/src/cmd_version.cpp b/src/cmd_version.cpp index 59949ee3d..8e80e3778 100644 --- a/src/cmd_version.cpp +++ b/src/cmd_version.cpp @@ -1,4 +1,4 @@ -/* +------------------------------------+ +/* +------------------------------------+ * | Inspire Internet Relay Chat Daemon | * +------------------------------------+ * @@ -54,23 +54,26 @@ extern InspIRCd* ServerInstance; void cmd_version::Handle (char **parameters, int pcnt, userrec *user) { + std::stringstream out(Config->data005); + std::string token = ""; + std::string line5 = ""; + int token_counter = 0; + 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; - } - } + + 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; + } + } } |