#include "helperfuncs.h"
#include "commands/cmd_version.h"
-extern ServerConfig* Config;
+extern InspIRCd* ServerInstance;
extern InspIRCd* ServerInstance;
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())
{
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;
}