extern int MODCOUNT;
extern InspSocket* socket_ref[65535];
extern time_t TIME;
-extern SocketEngine* SE;
extern userrec* fd_ref_table[65536];
-extern serverstats* stats;
extern ServerConfig *Config;
extern user_hash clientlist;
extern whowas_hash whowas;
+extern Module* IOHookModule;
std::vector<userrec*> local_users;
std::vector<userrec*> all_opers;
{
IOHookModule->OnRawSocketClose(user->fd);
}
- SE->DelFd(user->fd);
+ ServerInstance->SE->DelFd(user->fd);
user->CloseSocket();
}
{
IOHookModule->OnRawSocketClose(user->fd);
}
- SE->DelFd(user->fd);
+ ServerInstance->SE->DelFd(user->fd);
user->CloseSocket();
}
}
fd_ref_table[socket] = clientlist[tempnick];
local_users.push_back(clientlist[tempnick]);
- SE->AddFd(socket,true,X_ESTAB_CLIENT);
+ ServerInstance->SE->AddFd(socket,true,X_ESTAB_CLIENT);
}
void FullConnectUser(userrec* user)
{
- stats->statsConnects++;
+ ServerInstance->stats->statsConnects++;
user->idle_lastmsg = TIME;
log(DEBUG,"ConnectUser: %s",user->nick);
FOREACH_RESULT(OnUserPreNick(user,newnick));
if (MOD_RESULT) {
- stats->statsCollisions++;
+ ServerInstance->stats->statsCollisions++;
kill_link(user,"Nickname collision");
return;
}
if (matches_qline(newnick))
{
- stats->statsCollisions++;
+ ServerInstance->stats->statsCollisions++;
kill_link(user,"Nickname collision");
return;
}
{
char* pars[1];
pars[0] = nick;
- handle_nick(pars,1,user);
+ std::string cmd = "NICK";
+ ServerInstance->Parser->CallHandler(cmd,pars,1,user);
}
}
}