X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fcmd_version.cpp;h=eab4aec013fc82091a6466a3ee36a3f9bc15f2ce;hb=3382adb9e9a79748b4db09bb41a296861800fa2d;hp=bdb8a8b2336be936e5debeb1243e1ee5f1455085;hpb=d54fbc71e2a2e0f70002e2d36c669c4aa3d59e17;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/cmd_version.cpp b/src/cmd_version.cpp index bdb8a8b23..eab4aec01 100644 --- a/src/cmd_version.cpp +++ b/src/cmd_version.cpp @@ -18,20 +18,20 @@ #include "configreader.h" #include "users.h" #include "commands.h" -#include "helperfuncs.h" -#include "cmd_version.h" -extern ServerConfig* Config; -extern InspIRCd* ServerInstance; +#include "commands/cmd_version.h" -void cmd_version::Handle (char **parameters, int pcnt, userrec *user) + + + +void cmd_version::Handle (const char** parameters, int pcnt, userrec *user) { - std::stringstream out(Config->data005); + std::stringstream out(ServerInstance->Config->data005); std::string token = ""; std::string line5 = ""; int token_counter = 0; - WriteServ(user->fd,"351 %s :%s",user->nick,ServerInstance->GetVersionString().c_str()); + user->WriteServ("351 %s :%s",user->nick,ServerInstance->GetVersionString().c_str()); while (!out.eof()) { @@ -41,7 +41,7 @@ void cmd_version::Handle (char **parameters, int pcnt, userrec *user) if ((token_counter >= 13) || (out.eof() == true)) { - WriteServ(user->fd,"005 %s %s:are supported by this server",user->nick,line5.c_str()); + user->WriteServ("005 %s %s:are supported by this server",user->nick,line5.c_str()); line5 = ""; token_counter = 0; }