Rename CL to g_Clientlist

This commit is contained in:
Michael Cook (mackal) 2016-05-17 15:11:23 -04:00
parent 38af484368
commit 29da15f38c
4 changed files with 14 additions and 14 deletions

View File

@ -38,7 +38,7 @@ extern Database database;
extern std::string WorldShortName; extern std::string WorldShortName;
extern std::string GetMailPrefix(); extern std::string GetMailPrefix();
extern ChatChannelList *ChannelList; extern ChatChannelList *ChannelList;
extern Clientlist *CL; extern Clientlist *g_Clientlist;
extern uint32 ChatMessagesSent; extern uint32 ChatMessagesSent;
extern uint32 MailMessagesSent; 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()); 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) { 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()); 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)) { 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()); 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)) { 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()); 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) { if(!RequiredClient) {

View File

@ -48,7 +48,7 @@
#include "../common/string_util.h" #include "../common/string_util.h"
#include "chatchannel.h" #include "chatchannel.h"
extern Clientlist *CL; extern Clientlist *g_Clientlist;
extern std::string GetMailPrefix(); extern std::string GetMailPrefix();
extern ChatChannelList *ChannelList; extern ChatChannelList *ChannelList;
extern uint32 MailMessagesSent; 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()); 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) { if(client) {
std::string FQN = GetMailPrefix() + from; std::string FQN = GetMailPrefix() + from;

View File

@ -34,7 +34,7 @@
#include <signal.h> #include <signal.h>
ChatChannelList *ChannelList; ChatChannelList *ChannelList;
Clientlist *CL; Clientlist *g_Clientlist;
EQEmuLogSys Log; EQEmuLogSys Log;
TimeoutManager timeout_manager; TimeoutManager timeout_manager;
Database database; Database database;
@ -124,7 +124,7 @@ int main() {
exit(1); exit(1);
} }
CL = new Clientlist(Config->ChatPort); g_Clientlist = new Clientlist(Config->ChatPort);
ChannelList = new ChatChannelList(); ChannelList = new ChatChannelList();
@ -147,7 +147,7 @@ int main() {
Timer::SetCurrentTime(); Timer::SetCurrentTime();
CL->Process(); g_Clientlist->Process();
if(ChannelListProcessTimer.Check()) if(ChannelListProcessTimer.Check())
ChannelList->Process(); ChannelList->Process();
@ -165,7 +165,7 @@ int main() {
ChannelList->RemoveAllChannels(); ChannelList->RemoveAllChannels();
CL->CloseAllConnections(); g_Clientlist->CloseAllConnections();
Log.CloseFileLogs(); Log.CloseFileLogs();

View File

@ -34,7 +34,7 @@
#include "../common/md5.h" #include "../common/md5.h"
extern WorldServer worldserver; extern WorldServer worldserver;
extern Clientlist *CL; extern Clientlist *g_Clientlist;
extern const ucsconfig *Config; extern const ucsconfig *Config;
extern Database database; 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()); 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); safe_delete_array(From);
@ -109,7 +109,7 @@ void WorldServer::Process()
} }
else if(Message[0] == '[') else if(Message[0] == '[')
{ {
CL->ProcessOPMailCommand(c, Message.substr(1, std::string::npos)); g_Clientlist->ProcessOPMailCommand(c, Message.substr(1, std::string::npos));
} }
break; break;