diff --git a/ucs/clientlist.cpp b/ucs/clientlist.cpp index 0601abeb6..62fd79096 100644 --- a/ucs/clientlist.cpp +++ b/ucs/clientlist.cpp @@ -38,7 +38,7 @@ extern Database database; extern std::string WorldShortName; extern std::string GetMailPrefix(); extern ChatChannelList *ChannelList; -extern Clientlist *CL; +extern Clientlist *g_Clientlist; extern uint32 ChatMessagesSent; extern uint32 MailMessagesSent; @@ -1749,7 +1749,7 @@ void Client::ChannelInvite(std::string CommandString) { Log.Out(Logs::Detail, Logs::UCS_Server, "[%s] invites [%s] to channel [%s]", GetName().c_str(), Invitee.c_str(), ChannelName.c_str()); - Client *RequiredClient = CL->FindCharacter(Invitee); + Client *RequiredClient = g_Clientlist->FindCharacter(Invitee); if(!RequiredClient) { @@ -1877,7 +1877,7 @@ void Client::ChannelGrantModerator(std::string CommandString) { Log.Out(Logs::Detail, Logs::UCS_Server, "[%s] gives [%s] moderator rights to channel [%s]", GetName().c_str(), Moderator.c_str(), ChannelName.c_str()); - Client *RequiredClient = CL->FindCharacter(Moderator); + Client *RequiredClient = g_Clientlist->FindCharacter(Moderator); if(!RequiredClient && (database.FindCharacter(Moderator.c_str()) < 0)) { @@ -1958,7 +1958,7 @@ void Client::ChannelGrantVoice(std::string CommandString) { Log.Out(Logs::Detail, Logs::UCS_Server, "[%s] gives [%s] voice to channel [%s]", GetName().c_str(), Voicee.c_str(), ChannelName.c_str()); - Client *RequiredClient = CL->FindCharacter(Voicee); + Client *RequiredClient = g_Clientlist->FindCharacter(Voicee); if(!RequiredClient && (database.FindCharacter(Voicee.c_str()) < 0)) { @@ -2046,7 +2046,7 @@ void Client::ChannelKick(std::string CommandString) { Log.Out(Logs::Detail, Logs::UCS_Server, "[%s] kicks [%s] from channel [%s]", GetName().c_str(), Kickee.c_str(), ChannelName.c_str()); - Client *RequiredClient = CL->FindCharacter(Kickee); + Client *RequiredClient = g_Clientlist->FindCharacter(Kickee); if(!RequiredClient) { diff --git a/ucs/database.cpp b/ucs/database.cpp index c1721ffb9..dbd0af504 100644 --- a/ucs/database.cpp +++ b/ucs/database.cpp @@ -48,7 +48,7 @@ #include "../common/string_util.h" #include "chatchannel.h" -extern Clientlist *CL; +extern Clientlist *g_Clientlist; extern std::string GetMailPrefix(); extern ChatChannelList *ChannelList; extern uint32 MailMessagesSent; @@ -463,7 +463,7 @@ bool Database::SendMail(std::string recipient, std::string from, std::string sub Log.Out(Logs::Detail, Logs::UCS_Server, "MessageID %i generated, from %s, to %s", results.LastInsertedID(), from.c_str(), recipient.c_str()); - Client *client = CL->IsCharacterOnline(characterName); + Client *client = g_Clientlist->IsCharacterOnline(characterName); if(client) { std::string FQN = GetMailPrefix() + from; diff --git a/ucs/ucs.cpp b/ucs/ucs.cpp index b6beeb268..877ff0d0c 100644 --- a/ucs/ucs.cpp +++ b/ucs/ucs.cpp @@ -34,7 +34,7 @@ #include ChatChannelList *ChannelList; -Clientlist *CL; +Clientlist *g_Clientlist; EQEmuLogSys Log; TimeoutManager timeout_manager; Database database; @@ -124,7 +124,7 @@ int main() { exit(1); } - CL = new Clientlist(Config->ChatPort); + g_Clientlist = new Clientlist(Config->ChatPort); ChannelList = new ChatChannelList(); @@ -147,7 +147,7 @@ int main() { Timer::SetCurrentTime(); - CL->Process(); + g_Clientlist->Process(); if(ChannelListProcessTimer.Check()) ChannelList->Process(); @@ -165,7 +165,7 @@ int main() { ChannelList->RemoveAllChannels(); - CL->CloseAllConnections(); + g_Clientlist->CloseAllConnections(); Log.CloseFileLogs(); diff --git a/ucs/worldserver.cpp b/ucs/worldserver.cpp index 395d72e59..4e11c39b7 100644 --- a/ucs/worldserver.cpp +++ b/ucs/worldserver.cpp @@ -34,7 +34,7 @@ #include "../common/md5.h" extern WorldServer worldserver; -extern Clientlist *CL; +extern Clientlist *g_Clientlist; extern const ucsconfig *Config; extern Database database; @@ -90,7 +90,7 @@ void WorldServer::Process() Log.Out(Logs::Detail, Logs::UCS_Server, "Player: %s, Sent Message: %s", From, Message.c_str()); - Client *c = CL->FindCharacter(From); + Client *c = g_Clientlist->FindCharacter(From); safe_delete_array(From); @@ -109,7 +109,7 @@ void WorldServer::Process() } else if(Message[0] == '[') { - CL->ProcessOPMailCommand(c, Message.substr(1, std::string::npos)); + g_Clientlist->ProcessOPMailCommand(c, Message.substr(1, std::string::npos)); } break;