Streamline UCS

This commit is contained in:
Akkadius
2019-09-02 01:39:52 -05:00
parent bfd0752c4d
commit ccbbadc5ee
10 changed files with 124 additions and 124 deletions
+13 -13
View File
@@ -154,7 +154,7 @@ void ChatChannelList::SendAllChannels(Client *c) {
void ChatChannelList::RemoveChannel(ChatChannel *Channel) {
Log(Logs::Detail, Logs::UCSServer, "RemoveChannel(%s)", Channel->GetName().c_str());
LogInfo("RemoveChannel([{}])", Channel->GetName().c_str());
LinkedListIterator<ChatChannel*> iterator(ChatChannels);
@@ -175,7 +175,7 @@ void ChatChannelList::RemoveChannel(ChatChannel *Channel) {
void ChatChannelList::RemoveAllChannels() {
Log(Logs::Detail, Logs::UCSServer, "RemoveAllChannels");
LogInfo("RemoveAllChannels");
LinkedListIterator<ChatChannel*> iterator(ChatChannels);
@@ -233,7 +233,7 @@ void ChatChannel::AddClient(Client *c) {
if(IsClientInChannel(c)) {
Log(Logs::Detail, Logs::UCSServer, "Client %s already in channel %s", c->GetName().c_str(), GetName().c_str());
LogInfo("Client [{}] already in channel [{}]", c->GetName().c_str(), GetName().c_str());
return;
}
@@ -242,7 +242,7 @@ void ChatChannel::AddClient(Client *c) {
int AccountStatus = c->GetAccountStatus();
Log(Logs::Detail, Logs::UCSServer, "Adding %s to channel %s", c->GetName().c_str(), Name.c_str());
LogInfo("Adding [{}] to channel [{}]", c->GetName().c_str(), Name.c_str());
LinkedListIterator<Client*> iterator(ClientsInChannel);
@@ -267,7 +267,7 @@ bool ChatChannel::RemoveClient(Client *c) {
if(!c) return false;
Log(Logs::Detail, Logs::UCSServer, "RemoveClient %s from channel %s", c->GetName().c_str(), GetName().c_str());
LogInfo("RemoveClient [{}] from channel [{}]", c->GetName().c_str(), GetName().c_str());
bool HideMe = c->GetHideMe();
@@ -304,7 +304,7 @@ bool ChatChannel::RemoveClient(Client *c) {
if((Password.length() == 0) || (RuleI(Channels, DeleteTimer) == 0))
return false;
Log(Logs::Detail, Logs::UCSServer, "Starting delete timer for empty password protected channel %s", Name.c_str());
LogInfo("Starting delete timer for empty password protected channel [{}]", Name.c_str());
DeleteTimer.Start(RuleI(Channels, DeleteTimer) * 60000);
}
@@ -505,7 +505,7 @@ ChatChannel *ChatChannelList::AddClientToChannel(std::string ChannelName, Client
return nullptr;
}
Log(Logs::Detail, Logs::UCSServer, "AddClient to channel [%s] with password [%s]", NormalisedName.c_str(), Password.c_str());
LogInfo("AddClient to channel [[{}]] with password [[{}]]", NormalisedName.c_str(), Password.c_str());
ChatChannel *RequiredChannel = FindChannel(NormalisedName);
@@ -597,7 +597,7 @@ void ChatChannel::AddInvitee(const std::string &Invitee)
if (!IsInvitee(Invitee)) {
Invitees.push_back(Invitee);
Log(Logs::Detail, Logs::UCSServer, "Added %s as invitee to channel %s", Invitee.c_str(), Name.c_str());
LogInfo("Added [{}] as invitee to channel [{}]", Invitee.c_str(), Name.c_str());
}
}
@@ -608,7 +608,7 @@ void ChatChannel::RemoveInvitee(std::string Invitee)
if(it != std::end(Invitees)) {
Invitees.erase(it);
Log(Logs::Detail, Logs::UCSServer, "Removed %s as invitee to channel %s", Invitee.c_str(), Name.c_str());
LogInfo("Removed [{}] as invitee to channel [{}]", Invitee.c_str(), Name.c_str());
}
}
@@ -622,7 +622,7 @@ void ChatChannel::AddModerator(const std::string &Moderator)
if (!IsModerator(Moderator)) {
Moderators.push_back(Moderator);
Log(Logs::Detail, Logs::UCSServer, "Added %s as moderator to channel %s", Moderator.c_str(), Name.c_str());
LogInfo("Added [{}] as moderator to channel [{}]", Moderator.c_str(), Name.c_str());
}
}
@@ -633,7 +633,7 @@ void ChatChannel::RemoveModerator(const std::string &Moderator)
if (it != std::end(Moderators)) {
Moderators.erase(it);
Log(Logs::Detail, Logs::UCSServer, "Removed %s as moderator to channel %s", Moderator.c_str(), Name.c_str());
LogInfo("Removed [{}] as moderator to channel [{}]", Moderator.c_str(), Name.c_str());
}
}
@@ -647,7 +647,7 @@ void ChatChannel::AddVoice(const std::string &inVoiced)
if (!HasVoice(inVoiced)) {
Voiced.push_back(inVoiced);
Log(Logs::Detail, Logs::UCSServer, "Added %s as voiced to channel %s", inVoiced.c_str(), Name.c_str());
LogInfo("Added [{}] as voiced to channel [{}]", inVoiced.c_str(), Name.c_str());
}
}
@@ -658,7 +658,7 @@ void ChatChannel::RemoveVoice(const std::string &inVoiced)
if (it != std::end(Voiced)) {
Voiced.erase(it);
Log(Logs::Detail, Logs::UCSServer, "Removed %s as voiced to channel %s", inVoiced.c_str(), Name.c_str());
LogInfo("Removed [{}] as voiced to channel [{}]", inVoiced.c_str(), Name.c_str());
}
}