Browse Source

Consistency:

* Replaced instances of size() == 0 with isEmpty()
* Replaced instances of size() != 0 with isNotEmpty()
* Replaced instanes of isEmpty() == false with isNotEmpty()
* Updated some copyright years
Updated Jupiter (adds isNotEmpty() and a similar consistency update).
pull/3/head
JustinAJ 10 years ago
parent
commit
37c7ba9cdb
  1. 4
      Bot/IRC_Bot.cpp
  2. 14
      Bot/Main.cpp
  3. 4
      CoreCommands/CoreCommands.cpp
  4. 6
      ExtraCommands/ExtraCommands.cpp
  5. 6
      FunCommands/FunCommands.cpp
  6. 2
      Jupiter
  7. BIN
      Release/Bot.lib
  8. 90
      RenX.Commands/RenX_Commands.cpp
  9. 162
      RenX.Logging/RenX_Logging.cpp
  10. 20
      RenX.Medals/RenX_Medals.cpp
  11. 18
      RenX.ModSystem/RenX_ModSystem.cpp
  12. 20
      RenX.SetJoin/RenX_SetJoin.cpp
  13. 10
      RenX.Warn/RenX_Warn.cpp
  14. 6
      SetJoin/SetJoin.cpp

4
Bot/IRC_Bot.cpp

@ -1,5 +1,5 @@
/**
* Copyright (C) 2013-2014 Justin James.
* Copyright (C) 2013-2015 Justin James.
*
* This license must be preserved.
* Any applications, libraries, or code which make any use of any
@ -169,7 +169,7 @@ void IRC_Bot::OnChat(const Jupiter::ReadableString &channel, const Jupiter::Read
if (chan->getType() >= 0)
{
Jupiter::ReferenceString msg = message;
while (msg.isEmpty() == false && isspace(msg[0]))
while (msg.isNotEmpty() && isspace(msg[0]))
msg.shiftRight(1);
if (IRC_Bot::commandPrefix.size() <= msg.size())

14
Bot/Main.cpp

@ -1,5 +1,5 @@
/**
* Copyright (C) 2013-2014 Justin James.
* Copyright (C) 2013-2015 Justin James.
*
* This license must be preserved.
* Any applications, libraries, or code which make any use of any
@ -90,7 +90,7 @@ int main(int argc, const char **args)
fputs("Config loaded. ", stdout);
const Jupiter::ReadableString &pDir = Jupiter::IRC::Client::Config->get(STRING_LITERAL_AS_REFERENCE("Config"), STRING_LITERAL_AS_REFERENCE("PluginsDirectory"));
if (pDir.isEmpty() == false)
if (pDir.isNotEmpty())
{
Jupiter::setPluginDirectory(pDir);
printf("Plugins will be loaded from \"%.*s\"." ENDL, pDir.size(), pDir.ptr());
@ -130,11 +130,15 @@ int main(int argc, const char **args)
}
puts("Sockets established.");
size_t index;
while (1)
{
for (size_t i = 0; i < Jupiter::plugins->size(); i++)
if (Jupiter::plugins->get(i)->shouldRemove() || Jupiter::plugins->get(i)->think() != 0)
Jupiter::freePlugin(i);
index = 0;
while (index < Jupiter::plugins->size())
if (Jupiter::plugins->get(index)->shouldRemove() || Jupiter::plugins->get(index)->think() != 0)
Jupiter::freePlugin(index);
else
++index;
Jupiter_checkTimers();
serverManager->think();
Jupiter::ReferenceString input = (const char *)inputQueue.dequeue();

4
CoreCommands/CoreCommands.cpp

@ -1,5 +1,5 @@
/**
* Copyright (C) 2014 Justin James.
* Copyright (C) 2014-2015 Justin James.
*
* This license must be preserved.
* Any applications, libraries, or code which make any use of any
@ -175,7 +175,7 @@ void SyncIRCCommand::trigger(IRC_Bot *source, const Jupiter::ReadableString &cha
else
{
bool r;
if (parameters.size() != 0)
if (parameters.isNotEmpty())
r = source->Config->sync(parameters);
else r = source->Config->sync();
if (r) source->sendMessage(channel, STRING_LITERAL_AS_REFERENCE("Config data synced to file successfully."));

6
ExtraCommands/ExtraCommands.cpp

@ -1,5 +1,5 @@
/**
* Copyright (C) 2014 Justin James.
* Copyright (C) 2014-2015 Justin James.
*
* This license must be preserved.
* Any applications, libraries, or code which make any use of any
@ -109,7 +109,7 @@ void JoinIRCCommand::create()
void JoinIRCCommand::trigger(IRC_Bot *source, const Jupiter::ReadableString &channel, const Jupiter::ReadableString &nick, const Jupiter::ReadableString &parameters)
{
if (parameters.size() != 0)
if (parameters.isNotEmpty())
{
if (parameters.wordCount(WHITESPACE) == 1)
source->joinChannel(parameters);
@ -136,7 +136,7 @@ void PartIRCCommand::create()
void PartIRCCommand::trigger(IRC_Bot *source, const Jupiter::ReadableString &channel, const Jupiter::ReadableString &nick, const Jupiter::ReadableString &parameters)
{
if (parameters.size() != 0)
if (parameters.isNotEmpty())
{
if (parameters.wordCount(WHITESPACE) == 1)
source->partChannel(parameters);

6
FunCommands/FunCommands.cpp

@ -1,5 +1,5 @@
/**
* Copyright (C) 2014 Justin James.
* Copyright (C) 2014-2015 Justin James.
*
* This license must be preserved.
* Any applications, libraries, or code which make any use of any
@ -128,14 +128,14 @@ void ResolveIRCCommand::trigger(IRC_Bot *source, const Jupiter::ReadableString &
if (command.equalsi("hostname") || command.equalsi("host"))
{
Jupiter::ReferenceString resolved = Jupiter::Socket::resolveHostname(Jupiter::CStringS::gotoWord(parameters, 1, WHITESPACE).c_str(), 0);
if (resolved.isEmpty() == false)
if (resolved.isNotEmpty())
source->sendMessage(channel, resolved);
else source->sendMessage(channel, STRING_LITERAL_AS_REFERENCE("Error: Unable to resolve."));
}
else if (command.equalsi("ip"))
{
Jupiter::ReferenceString resolved = Jupiter::Socket::resolveAddress(Jupiter::CStringS::gotoWord(parameters, 1, WHITESPACE).c_str(), 0);
if (resolved.isEmpty() == false)
if (resolved.isNotEmpty())
source->sendMessage(channel, resolved);
else source->sendMessage(channel, STRING_LITERAL_AS_REFERENCE("Error: Unable to resolve."));
}

2
Jupiter

@ -1 +1 @@
Subproject commit 3612c3f6cba1d423838669d130757728182d439c
Subproject commit 75185185f124af98d3189e8530e919033c638901

BIN
Release/Bot.lib

Binary file not shown.

90
RenX.Commands/RenX_Commands.cpp

@ -115,7 +115,7 @@ void RawRCONConsoleCommand::trigger(const Jupiter::ReadableString &parameters)
int i = RenX::getCore()->getServerCount();
if (i == 0)
puts("Error: Not connected to any Renegade X servers.");
else if (parameters.isEmpty() == false)
else if (parameters.isNotEmpty())
while (--i >= 0)
RenX::getCore()->getServer(i)->sendData(msg);
else
@ -170,7 +170,7 @@ void MsgIRCCommand::create()
void MsgIRCCommand::trigger(IRC_Bot *source, const Jupiter::ReadableString &channel, const Jupiter::ReadableString &nick, const Jupiter::ReadableString &parameters)
{
if (parameters.isEmpty() == false)
if (parameters.isNotEmpty())
{
int type = source->getChannel(channel)->getType();
Jupiter::StringL msg;
@ -230,7 +230,7 @@ void PMsgIRCCommand::trigger(IRC_Bot *source, const Jupiter::ReadableString &cha
msg += nick;
msg += "@IRC: ";
msg += Jupiter::ReferenceString::gotoWord(parameters, 1, WHITESPACE);
if (parameters.size() != 0)
if (parameters.isNotEmpty())
{
for (unsigned int i = 0; i != RenX::getCore()->getServerCount(); i++)
{
@ -268,7 +268,7 @@ void HostMsgIRCCommand::create()
void HostMsgIRCCommand::trigger(IRC_Bot *source, const Jupiter::ReadableString &channel, const Jupiter::ReadableString &nick, const Jupiter::ReadableString &parameters)
{
if (parameters.isEmpty() == false)
if (parameters.isNotEmpty())
{
int type = source->getChannel(channel)->getType();
@ -545,11 +545,6 @@ void PlayerTableIRCCommand::trigger(IRC_Bot *source, const Jupiter::ReadableStri
source->sendMessage(channel, Jupiter::StringS::Format(IRCCOLOR "%.*s%*.*s" IRCCOLOR " " IRCCOLOR "03|" IRCCOLOR " %*d " IRCCOLOR "03|" IRCCOLOR " %*.0f " IRCCOLOR "03|" IRCCOLOR " %*.0f", color.size(), color.ptr(), maxNickLen, player->name.size(), player->name.ptr(), idColLen, player->id, scoreColLen, player->score, creditColLen, player->credits));
};
// Team colors
const Jupiter::ReadableString &gTeamColor = RenX::getTeamColor(RenX::TeamType::GDI);
const Jupiter::ReadableString &nTeamColor = RenX::getTeamColor(RenX::TeamType::Nod);
const Jupiter::ReadableString &oTeamColor = RenX::getTeamColor(RenX::TeamType::Other);
for (Jupiter::SLList<RenX::PlayerInfo>::Node *node = gPlayers.getNode(0); node != nullptr; node = node->next)
output_player(node->data, gTeamColor);
@ -587,7 +582,7 @@ void PlayerInfoIRCCommand::create()
void PlayerInfoIRCCommand::trigger(IRC_Bot *source, const Jupiter::ReadableString &channel, const Jupiter::ReadableString &nick, const Jupiter::ReadableString &parameters)
{
if (parameters.size() != 0)
if (parameters.isNotEmpty())
{
Jupiter::IRC::Client::Channel *chan = source->getChannel(channel);
if (chan != nullptr)
@ -644,7 +639,7 @@ void SteamIRCCommand::trigger(IRC_Bot *source, const Jupiter::ReadableString &ch
{
int type = chan->getType();
RenX::PlayerInfo *player;
if (parameters.size() != 0)
if (parameters.isNotEmpty())
{
Jupiter::StringL msg;
for (unsigned int i = 0; i != RenX::getCore()->getServerCount(); i++)
@ -724,7 +719,7 @@ void KillDeathRatioIRCCommand::create()
void KillDeathRatioIRCCommand::trigger(IRC_Bot *source, const Jupiter::ReadableString &channel, const Jupiter::ReadableString &nick, const Jupiter::ReadableString &parameters)
{
if (parameters.size() != 0)
if (parameters.isNotEmpty())
{
Jupiter::IRC::Client::Channel *chan = source->getChannel(channel);
if (chan != nullptr)
@ -831,20 +826,23 @@ void ModsIRCCommand::trigger(IRC_Bot *source, const Jupiter::ReadableString &cha
for (Jupiter::DLList<RenX::PlayerInfo>::Node *node = server->players.getNode(0); node != nullptr; node = node->next)
{
player = node->data;
if (player->isBot == false && (player->adminType.isEmpty() == false || (player->access != 0 && (player->gamePrefix.isEmpty() == false || player->formatNamePrefix.isEmpty() == false))))
if (player->isBot == false && (player->adminType.isNotEmpty() || (player->access != 0 && (player->gamePrefix.isNotEmpty() || player->formatNamePrefix.isNotEmpty()))))
{
if (msg.size() != 0) msg += ", ";
if (msg.isNotEmpty())
msg += ", ";
else msg += "Moderators in-game: ";
msg += player->gamePrefix;
msg += player->name;
}
}
}
if (msg.size() == 0) msg = "No moderators are in-game.";
if (msg.isEmpty())
msg = "No moderators are in-game.";
source->sendMessage(channel, msg);
}
}
if (msg.size() == 0) source->sendMessage(channel, STRING_LITERAL_AS_REFERENCE("Error: Channel not attached to any connected Renegade X servers."));
if (msg.isEmpty())
source->sendMessage(channel, STRING_LITERAL_AS_REFERENCE("Error: Channel not attached to any connected Renegade X servers."));
}
}
}
@ -873,7 +871,7 @@ void BanSearchIRCCommand::create()
void BanSearchIRCCommand::trigger(IRC_Bot *source, const Jupiter::ReadableString &channel, const Jupiter::ReadableString &nick, const Jupiter::ReadableString &parameters)
{
auto entries = RenX::banDatabase->getEntries();
if (parameters.isEmpty() == false)
if (parameters.isNotEmpty())
{
if (entries.size() == 0)
source->sendNotice(nick, STRING_LITERAL_AS_REFERENCE("The ban database is empty!"));
@ -983,7 +981,8 @@ void ShowRulesIRCCommand::trigger(IRC_Bot *source, const Jupiter::ReadableString
server->sendMessage(msg);
}
}
if (msg.size() == 0) source->sendMessage(channel, STRING_LITERAL_AS_REFERENCE("Error: Channel not attached to any connected Renegade X servers."));
if (msg.isEmpty())
source->sendMessage(channel, STRING_LITERAL_AS_REFERENCE("Error: Channel not attached to any connected Renegade X servers."));
}
}
@ -1022,7 +1021,8 @@ void RulesIRCCommand::trigger(IRC_Bot *source, const Jupiter::ReadableString &ch
source->sendMessage(channel, msg);
}
}
if (msg.size() == 0) source->sendMessage(channel, STRING_LITERAL_AS_REFERENCE("Error: Channel not attached to any connected Renegade X servers."));
if (msg.isEmpty())
source->sendMessage(channel, STRING_LITERAL_AS_REFERENCE("Error: Channel not attached to any connected Renegade X servers."));
}
}
}
@ -1045,7 +1045,7 @@ void SetRulesIRCCommand::create()
void SetRulesIRCCommand::trigger(IRC_Bot *source, const Jupiter::ReadableString &channel, const Jupiter::ReadableString &nick, const Jupiter::ReadableString &parameters)
{
if (parameters.size() != 0)
if (parameters.isNotEmpty())
{
unsigned int r = 0;
Jupiter::IRC::Client::Channel *chan = source->getChannel(channel);
@ -1166,7 +1166,7 @@ void SetMapIRCCommand::create()
void SetMapIRCCommand::trigger(IRC_Bot *source, const Jupiter::ReadableString &channel, const Jupiter::ReadableString &nick, const Jupiter::ReadableString &parameters)
{
if (parameters.isEmpty() == false)
if (parameters.isNotEmpty())
{
Jupiter::IRC::Client::Channel *chan = source->getChannel(channel);
if (chan != nullptr)
@ -1209,7 +1209,7 @@ void MuteIRCCommand::create()
void MuteIRCCommand::trigger(IRC_Bot *source, const Jupiter::ReadableString &channel, const Jupiter::ReadableString &nick, const Jupiter::ReadableString &parameters)
{
if (parameters.isEmpty() == false)
if (parameters.isNotEmpty())
{
Jupiter::IRC::Client::Channel *chan = source->getChannel(channel);
if (chan != nullptr)
@ -1258,7 +1258,7 @@ void UnMuteIRCCommand::create()
void UnMuteIRCCommand::trigger(IRC_Bot *source, const Jupiter::ReadableString &channel, const Jupiter::ReadableString &nick, const Jupiter::ReadableString &parameters)
{
if (parameters.isEmpty() == false)
if (parameters.isNotEmpty())
{
Jupiter::IRC::Client::Channel *chan = source->getChannel(channel);
if (chan != nullptr)
@ -1307,7 +1307,7 @@ void KillIRCCommand::create()
void KillIRCCommand::trigger(IRC_Bot *source, const Jupiter::ReadableString &channel, const Jupiter::ReadableString &nick, const Jupiter::ReadableString &parameters)
{
if (parameters.isEmpty() == false)
if (parameters.isNotEmpty())
{
Jupiter::IRC::Client::Channel *chan = source->getChannel(channel);
if (chan != nullptr)
@ -1356,7 +1356,7 @@ void DisarmIRCCommand::create()
void DisarmIRCCommand::trigger(IRC_Bot *source, const Jupiter::ReadableString &channel, const Jupiter::ReadableString &nick, const Jupiter::ReadableString &parameters)
{
if (parameters.isEmpty() == false)
if (parameters.isNotEmpty())
{
Jupiter::IRC::Client::Channel *chan = source->getChannel(channel);
if (chan != nullptr)
@ -1405,7 +1405,7 @@ void DisarmC4IRCCommand::create()
void DisarmC4IRCCommand::trigger(IRC_Bot *source, const Jupiter::ReadableString &channel, const Jupiter::ReadableString &nick, const Jupiter::ReadableString &parameters)
{
if (parameters.isEmpty() == false)
if (parameters.isNotEmpty())
{
Jupiter::IRC::Client::Channel *chan = source->getChannel(channel);
if (chan != nullptr)
@ -1456,7 +1456,7 @@ void DisarmBeaconIRCCommand::create()
void DisarmBeaconIRCCommand::trigger(IRC_Bot *source, const Jupiter::ReadableString &channel, const Jupiter::ReadableString &nick, const Jupiter::ReadableString &parameters)
{
if (parameters.isEmpty() == false)
if (parameters.isNotEmpty())
{
Jupiter::IRC::Client::Channel *chan = source->getChannel(channel);
if (chan != nullptr)
@ -1507,7 +1507,7 @@ void KickIRCCommand::create()
void KickIRCCommand::trigger(IRC_Bot *source, const Jupiter::ReadableString &channel, const Jupiter::ReadableString &nick, const Jupiter::ReadableString &parameters)
{
if (parameters.size() != 0)
if (parameters.isNotEmpty())
{
Jupiter::IRC::Client::Channel *chan = source->getChannel(channel);
if (chan != nullptr)
@ -1561,7 +1561,7 @@ void TempBanIRCCommand::create()
void TempBanIRCCommand::trigger(IRC_Bot *source, const Jupiter::ReadableString &channel, const Jupiter::ReadableString &nick, const Jupiter::ReadableString &parameters)
{
if (parameters.size() != 0)
if (parameters.isNotEmpty())
{
Jupiter::IRC::Client::Channel *chan = source->getChannel(channel);
if (chan != nullptr)
@ -1619,7 +1619,7 @@ void KickBanIRCCommand::create()
void KickBanIRCCommand::trigger(IRC_Bot *source, const Jupiter::ReadableString &channel, const Jupiter::ReadableString &nick, const Jupiter::ReadableString &parameters)
{
if (parameters.size() != 0)
if (parameters.isNotEmpty())
{
Jupiter::IRC::Client::Channel *chan = source->getChannel(channel);
if (chan != nullptr)
@ -1678,7 +1678,7 @@ void UnBanIRCCommand::create()
void UnBanIRCCommand::trigger(IRC_Bot *source, const Jupiter::ReadableString &channel, const Jupiter::ReadableString &nick, const Jupiter::ReadableString &parameters)
{
if (parameters.size() != 0)
if (parameters.isNotEmpty())
{
size_t index = static_cast<size_t>(parameters.asUnsignedLongLong());
if (index < RenX::banDatabase->getEntries().size())
@ -1720,7 +1720,7 @@ void AddBotsIRCCommand::trigger(IRC_Bot *source, const Jupiter::ReadableString &
if (servers.size() != 0)
{
int amount = 1;
if (parameters.isEmpty() == false)
if (parameters.isNotEmpty())
amount = parameters.asInt();
if (amount != 0)
{
@ -1828,7 +1828,7 @@ void PhaseBotsIRCCommand::trigger(IRC_Bot *source, const Jupiter::ReadableString
for (size_t i = 0; i != servers.size(); i++)
{
server = servers.get(i);
if (parameters.size() == 0)
if (parameters.isEmpty())
{
if (togglePhasing(server))
server->sendMessage(STRING_LITERAL_AS_REFERENCE("Bot phasing has been enabled."));
@ -1966,7 +1966,7 @@ void TeamChangeIRCCommand::create()
void TeamChangeIRCCommand::trigger(IRC_Bot *source, const Jupiter::ReadableString &channel, const Jupiter::ReadableString &nick, const Jupiter::ReadableString &parameters)
{
if (parameters.isEmpty() == false)
if (parameters.isNotEmpty())
{
Jupiter::IRC::Client::Channel *chan = source->getChannel(channel);
if (chan != nullptr)
@ -2021,7 +2021,7 @@ void TeamChange2IRCCommand::create()
void TeamChange2IRCCommand::trigger(IRC_Bot *source, const Jupiter::ReadableString &channel, const Jupiter::ReadableString &nick, const Jupiter::ReadableString &parameters)
{
if (parameters.isEmpty() == false)
if (parameters.isNotEmpty())
{
Jupiter::IRC::Client::Channel *chan = source->getChannel(channel);
if (chan != nullptr)
@ -2106,7 +2106,7 @@ void HelpGameCommand::trigger(RenX::Server *source, RenX::PlayerInfo *player, co
for (int i = 0; i <= player->access; i++)
{
Jupiter::ReadableString &msg = getAccessCommands(i);
if (msg.isEmpty() == false)
if (msg.isNotEmpty())
source->sendMessage(player, getAccessCommands(i));
}
if (cmdCount == 0)
@ -2150,7 +2150,7 @@ void ModsGameCommand::trigger(RenX::Server *source, RenX::PlayerInfo *, const Ju
for (Jupiter::DLList<RenX::PlayerInfo>::Node *node = source->players.getNode(0); node != nullptr; node = node->next)
{
player = node->data;
if (player->isBot == false && (player->adminType.size() != 0 || (player->access != 0 && (player->gamePrefix.isEmpty() == false || player->formatNamePrefix.isEmpty() == false))))
if (player->isBot == false && (player->adminType.isNotEmpty() || (player->access != 0 && (player->gamePrefix.isNotEmpty() || player->formatNamePrefix.isNotEmpty()))))
{
if (msg.isEmpty())
msg = "Moderators in-game: ";
@ -2273,7 +2273,7 @@ void KillGameCommand::create()
void KillGameCommand::trigger(RenX::Server *source, RenX::PlayerInfo *player, const Jupiter::ReadableString &parameters)
{
if (parameters.isEmpty() == false)
if (parameters.isNotEmpty())
{
RenX::PlayerInfo *target = source->getPlayerByPartName(parameters);
if (target == nullptr)
@ -2308,7 +2308,7 @@ void DisarmGameCommand::create()
void DisarmGameCommand::trigger(RenX::Server *source, RenX::PlayerInfo *player, const Jupiter::ReadableString &parameters)
{
if (parameters.isEmpty() == false)
if (parameters.isNotEmpty())
{
RenX::PlayerInfo *target = source->getPlayerByPartName(parameters);
if (target == nullptr)
@ -2343,7 +2343,7 @@ void DisarmC4GameCommand::create()
void DisarmC4GameCommand::trigger(RenX::Server *source, RenX::PlayerInfo *player, const Jupiter::ReadableString &parameters)
{
if (parameters.isEmpty() == false)
if (parameters.isNotEmpty())
{
RenX::PlayerInfo *target = source->getPlayerByPartName(parameters);
if (target == nullptr)
@ -2380,7 +2380,7 @@ void DisarmBeaconGameCommand::create()
void DisarmBeaconGameCommand::trigger(RenX::Server *source, RenX::PlayerInfo *player, const Jupiter::ReadableString &parameters)
{
if (parameters.isEmpty() == false)
if (parameters.isNotEmpty())
{
RenX::PlayerInfo *target = source->getPlayerByPartName(parameters);
if (target == nullptr)
@ -2417,7 +2417,7 @@ void KickGameCommand::create()
void KickGameCommand::trigger(RenX::Server *source, RenX::PlayerInfo *player, const Jupiter::ReadableString &parameters)
{
if (parameters.isEmpty() == false)
if (parameters.isNotEmpty())
{
Jupiter::StringS name = Jupiter::StringS::getWord(parameters, 0, WHITESPACE);
Jupiter::StringS reason = parameters.wordCount(WHITESPACE) > 1 ? Jupiter::StringS::gotoWord(parameters, 1, WHITESPACE) : STRING_LITERAL_AS_REFERENCE("No reason");
@ -2458,7 +2458,7 @@ void TempBanGameCommand::create()
void TempBanGameCommand::trigger(RenX::Server *source, RenX::PlayerInfo *player, const Jupiter::ReadableString &parameters)
{
if (parameters.isEmpty() == false)
if (parameters.isNotEmpty())
{
Jupiter::StringS name = Jupiter::StringS::getWord(parameters, 0, WHITESPACE);
Jupiter::StringS reason = parameters.wordCount(WHITESPACE) > 1 ? Jupiter::StringS::gotoWord(parameters, 1, WHITESPACE) : STRING_LITERAL_AS_REFERENCE("No reason");
@ -2501,7 +2501,7 @@ void KickBanGameCommand::create()
void KickBanGameCommand::trigger(RenX::Server *source, RenX::PlayerInfo *player, const Jupiter::ReadableString &parameters)
{
if (parameters.isEmpty() == false)
if (parameters.isNotEmpty())
{
Jupiter::StringS name = Jupiter::StringS::getWord(parameters, 0, WHITESPACE);
Jupiter::StringS reason = parameters.wordCount(WHITESPACE) > 1 ? Jupiter::StringS::gotoWord(parameters, 1, WHITESPACE) : STRING_LITERAL_AS_REFERENCE("No reason");
@ -2617,7 +2617,7 @@ void PhaseBotsGameCommand::create()
void PhaseBotsGameCommand::trigger(RenX::Server *source, RenX::PlayerInfo *player, const Jupiter::ReadableString &parameters)
{
if (parameters.size() == 0)
if (parameters.isEmpty())
{
if (togglePhasing(source))
source->sendMessage(player, STRING_LITERAL_AS_REFERENCE("Bot phasing has been enabled."));

162
RenX.Logging/RenX_Logging.cpp

@ -476,7 +476,7 @@ void RenX_LoggingPlugin::RenX_OnJoin(RenX::Server *server, const RenX::PlayerInf
if (RenX_LoggingPlugin::joinPublic)
{
msg = this->joinPublicFmt;
if (msg.isEmpty() == false)
if (msg.isNotEmpty())
{
RenX::processTags(msg, server, player);
server->sendPubChan(msg);
@ -486,7 +486,7 @@ void RenX_LoggingPlugin::RenX_OnJoin(RenX::Server *server, const RenX::PlayerInf
msg = this->joinNoSteamAdminFmt;
else
msg = this->joinAdminFmt;
if (msg.isEmpty() == false)
if (msg.isNotEmpty())
{
RenX::processTags(msg, server, player);
server->sendAdmChan(msg);
@ -502,7 +502,7 @@ void RenX_LoggingPlugin::RenX_OnPart(RenX::Server *server, const RenX::PlayerInf
func = &RenX::Server::sendAdmChan;
Jupiter::String msg = this->partFmt;
if (msg.isEmpty() == false)
if (msg.isNotEmpty())
{
RenX::processTags(msg, server, player);
(server->*func)(msg);
@ -518,7 +518,7 @@ void RenX_LoggingPlugin::RenX_OnKick(RenX::Server *server, const RenX::PlayerInf
func = &RenX::Server::sendAdmChan;
Jupiter::String msg = this->kickFmt;
if (msg.isEmpty() == false)
if (msg.isNotEmpty())
{
RenX::processTags(msg, server, player);
msg.replace(RenX::tags->INTERNAL_MESSAGE_TAG, reason);
@ -535,7 +535,7 @@ void RenX_LoggingPlugin::RenX_OnNameChange(RenX::Server *server, const RenX::Pla
func = &RenX::Server::sendAdmChan;
Jupiter::String msg = this->nameChangeFmt;
if (msg.isEmpty() == false)
if (msg.isNotEmpty())
{
RenX::processTags(msg, server, player);
msg.replace(RenX::tags->INTERNAL_NEW_NAME_TAG, newPlayerName);
@ -552,7 +552,7 @@ void RenX_LoggingPlugin::RenX_OnTeamChange(RenX::Server *server, const RenX::Pla
func = &RenX::Server::sendAdmChan;
Jupiter::String msg = this->teamChangeFmt;
if (msg.isEmpty() == false)
if (msg.isNotEmpty())
{
RenX::processTags(msg, server, player);
(server->*func)(msg);
@ -568,7 +568,7 @@ void RenX_LoggingPlugin::RenX_OnExecute(RenX::Server *server, const RenX::Player
func = &RenX::Server::sendAdmChan;
Jupiter::String msg = this->playerExecuteFmt;
if (msg.isEmpty() == false)
if (msg.isNotEmpty())
{
processTags(msg, server, player);
msg.replace(RenX::tags->INTERNAL_MESSAGE_TAG, command);
@ -585,7 +585,7 @@ void RenX_LoggingPlugin::RenX_OnPlayer(RenX::Server *server, const Jupiter::Read
func = &RenX::Server::sendAdmChan;
Jupiter::String msg = this->playerFmt;
if (msg.isEmpty() == false)
if (msg.isNotEmpty())
{
RenX::processTags(msg, server);
msg.replace(RenX::tags->INTERNAL_MESSAGE_TAG, raw);
@ -602,7 +602,7 @@ void RenX_LoggingPlugin::RenX_OnChat(RenX::Server *server, const RenX::PlayerInf
func = &RenX::Server::sendAdmChan;
Jupiter::String msg = this->chatFmt;
if (msg.isEmpty() == false)
if (msg.isNotEmpty())
{
RenX::processTags(msg, server, player);
msg.replace(RenX::tags->INTERNAL_MESSAGE_TAG, message);
@ -619,7 +619,7 @@ void RenX_LoggingPlugin::RenX_OnTeamChat(RenX::Server *server, const RenX::Playe
func = &RenX::Server::sendAdmChan;
Jupiter::String msg = this->teamChatFmt;
if (msg.isEmpty() == false)
if (msg.isNotEmpty())
{
RenX::processTags(msg, server, player);
msg.replace(RenX::tags->INTERNAL_MESSAGE_TAG, message);
@ -636,7 +636,7 @@ void RenX_LoggingPlugin::RenX_OnHostChat(RenX::Server *server, const Jupiter::Re
func = &RenX::Server::sendAdmChan;
Jupiter::String msg = this->hostChatFmt;
if (msg.isEmpty() == false)
if (msg.isNotEmpty())
{
RenX::processTags(msg, server);
msg.replace(RenX::tags->INTERNAL_MESSAGE_TAG, message);
@ -653,7 +653,7 @@ void RenX_LoggingPlugin::RenX_OnHostPage(RenX::Server *server, const RenX::Playe
func = &RenX::Server::sendAdmChan;
Jupiter::String msg = this->hostPageFmt;
if (msg.isEmpty() == false)
if (msg.isNotEmpty())
{
RenX::processTags(msg, server, player);
msg.replace(RenX::tags->INTERNAL_MESSAGE_TAG, message);
@ -670,7 +670,7 @@ void RenX_LoggingPlugin::RenX_OnOtherChat(RenX::Server *server, const Jupiter::R
func = &RenX::Server::sendAdmChan;
Jupiter::String msg = this->otherChatFmt;
if (msg.isEmpty() == false)
if (msg.isNotEmpty())
{
RenX::processTags(msg, server);
msg.replace(RenX::tags->INTERNAL_MESSAGE_TAG, raw);
@ -700,7 +700,7 @@ void RenX_LoggingPlugin::RenX_OnDeploy(RenX::Server *server, const RenX::PlayerI
msg = this->mineDeployFmt;
}
if (msg.isEmpty() == false)
if (msg.isNotEmpty())
{
RenX::processTags(msg, server, player);
msg.replace(RenX::tags->INTERNAL_OBJECT_TAG, RenX::translateName(object));
@ -731,7 +731,7 @@ void RenX_LoggingPlugin::RenX_OnDisarm(RenX::Server *server, const RenX::PlayerI
msg = this->mineDisarmFmt;
}
if (msg.isEmpty() == false)
if (msg.isNotEmpty())
{
RenX::processTags(msg, server, player, victim);
msg.replace(RenX::tags->INTERNAL_OBJECT_TAG, RenX::translateName(object));
@ -762,7 +762,7 @@ void RenX_LoggingPlugin::RenX_OnDisarm(RenX::Server *server, const RenX::PlayerI
msg = this->mineDisarmNoOwnerFmt;
}
if (msg.isEmpty() == false)
if (msg.isNotEmpty())
{
RenX::processTags(msg, server, player);
msg.replace(RenX::tags->INTERNAL_OBJECT_TAG, RenX::translateName(object));
@ -779,7 +779,7 @@ void RenX_LoggingPlugin::RenX_OnExplode(RenX::Server *server, const RenX::Player
func = &RenX::Server::sendAdmChan;
Jupiter::String msg = this->explodeFmt;
if (msg.isEmpty() == false)
if (msg.isNotEmpty())
{
RenX::processTags(msg, server, player);
msg.replace(RenX::tags->INTERNAL_WEAPON_TAG, RenX::translateName(object));
@ -797,7 +797,7 @@ void RenX_LoggingPlugin::RenX_OnExplode(RenX::Server *server, const Jupiter::Rea
func = &RenX::Server::sendAdmChan;
Jupiter::String msg = this->explodeNoOwnerFmt;
if (msg.isEmpty() == false)
if (msg.isNotEmpty())
{
RenX::processTags(msg, server);
msg.replace(RenX::tags->INTERNAL_WEAPON_TAG, RenX::translateName(object));
@ -815,7 +815,7 @@ void RenX_LoggingPlugin::RenX_OnSuicide(RenX::Server *server, const RenX::Player
func = &RenX::Server::sendAdmChan;
Jupiter::String msg = this->suicideFmt;
if (msg.isEmpty() == false)
if (msg.isNotEmpty())
{
RenX::processTags(msg, server, player);
msg.replace(RenX::tags->INTERNAL_WEAPON_TAG, RenX::translateName(damageType));
@ -832,7 +832,7 @@ void RenX_LoggingPlugin::RenX_OnKill(RenX::Server *server, const RenX::PlayerInf
func = &RenX::Server::sendAdmChan;
Jupiter::String msg = this->killFmt;
if (msg.isEmpty() == false)
if (msg.isNotEmpty())
{
RenX::processTags(msg, server, player, victim);
msg.replace(RenX::tags->INTERNAL_WEAPON_TAG, RenX::translateName(damageType));
@ -849,7 +849,7 @@ void RenX_LoggingPlugin::RenX_OnKill(RenX::Server *server, const Jupiter::Readab
func = &RenX::Server::sendAdmChan;
Jupiter::String msg = this->killFmt2;
if (msg.isEmpty() == false)
if (msg.isNotEmpty())
{
RenX::processTags(msg, server, nullptr, victim);
msg.replace(RenX::tags->INTERNAL_NAME_TAG, RenX::translateName(killer));
@ -870,7 +870,7 @@ void RenX_LoggingPlugin::RenX_OnDie(RenX::Server *server, const RenX::PlayerInfo
func = &RenX::Server::sendAdmChan;
Jupiter::String msg = this->dieFmt;
if (msg.isEmpty() == false)
if (msg.isNotEmpty())
{
RenX::processTags(msg, server, player);
msg.replace(RenX::tags->INTERNAL_WEAPON_TAG, RenX::translateName(damageType));
@ -887,7 +887,7 @@ void RenX_LoggingPlugin::RenX_OnDie(RenX::Server *server, const Jupiter::Readabl
func = &RenX::Server::sendAdmChan;
Jupiter::String msg = this->dieFmt2;
if (msg.isEmpty() == false)
if (msg.isNotEmpty())
{
RenX::processTags(msg, server);
msg.replace(RenX::tags->INTERNAL_NAME_TAG, RenX::translateName(object));
@ -920,7 +920,7 @@ void RenX_LoggingPlugin::RenX_OnDestroy(RenX::Server *server, const RenX::Player
msg = this->destroyVehicleFmt;
break;
}
if (msg.isEmpty() == false)
if (msg.isNotEmpty())
{
RenX::processTags(msg, server, player);
msg.replace(RenX::tags->INTERNAL_VICTIM_TEAM_COLOR_TAG, RenX::getTeamColor(objectTeam));
@ -941,7 +941,7 @@ void RenX_LoggingPlugin::RenX_OnCapture(RenX::Server *server, const RenX::Player
func = &RenX::Server::sendAdmChan;
Jupiter::String msg = this->captureFmt;
if (msg.isEmpty() == false)
if (msg.isNotEmpty())
{
RenX::processTags(msg, server, player);
msg.replace(RenX::tags->INTERNAL_OBJECT_TAG, RenX::translateName(building));
@ -961,7 +961,7 @@ void RenX_LoggingPlugin::RenX_OnNeutralize(RenX::Server *server, const RenX::Pla
func = &RenX::Server::sendAdmChan;
Jupiter::String msg = this->neutralizeFmt;
if (msg.isEmpty() == false)
if (msg.isNotEmpty())
{
RenX::processTags(msg, server, player);
msg.replace(RenX::tags->INTERNAL_OBJECT_TAG, RenX::translateName(building));
@ -981,7 +981,7 @@ void RenX_LoggingPlugin::RenX_OnCharacterPurchase(RenX::Server *server, const Re
func = &RenX::Server::sendAdmChan;
Jupiter::String msg = this->characterPurchaseFmt;
if (msg.isEmpty() == false)
if (msg.isNotEmpty())
{
RenX::processTags(msg, server, player);
msg.replace(RenX::tags->INTERNAL_VICTIM_CHARACTER_TAG, RenX::translateName(character));
@ -998,7 +998,7 @@ void RenX_LoggingPlugin::RenX_OnItemPurchase(RenX::Server *server, const RenX::P
func = &RenX::Server::sendAdmChan;
Jupiter::String msg = this->itemPurchaseFmt;
if (msg.isEmpty() == false)
if (msg.isNotEmpty())
{
RenX::processTags(msg, server, player);
msg.replace(RenX::tags->INTERNAL_OBJECT_TAG, RenX::translateName(item));
@ -1015,7 +1015,7 @@ void RenX_LoggingPlugin::RenX_OnWeaponPurchase(RenX::Server *server, const RenX:
func = &RenX::Server::sendAdmChan;
Jupiter::String msg = this->weaponPurchaseFmt;
if (msg.isEmpty() == false)
if (msg.isNotEmpty())
{
RenX::processTags(msg, server, player);
msg.replace(RenX::tags->INTERNAL_WEAPON_TAG, RenX::translateName(weapon));
@ -1032,7 +1032,7 @@ void RenX_LoggingPlugin::RenX_OnRefillPurchase(RenX::Server *server, const RenX:
func = &RenX::Server::sendAdmChan;
Jupiter::String msg = this->refillPurchaseFmt;
if (msg.isEmpty() == false)
if (msg.isNotEmpty())
{
RenX::processTags(msg, server, player);
(server->*func)(msg);
@ -1048,7 +1048,7 @@ void RenX_LoggingPlugin::RenX_OnVehiclePurchase(RenX::Server *server, const RenX
func = &RenX::Server::sendAdmChan;
Jupiter::String msg = this->vehiclePurchaseFmt;
if (msg.isEmpty() == false)
if (msg.isNotEmpty())
{
RenX::processTags(msg, server, owner);
msg.replace(RenX::tags->INTERNAL_VICTIM_VEHICLE_TAG, RenX::translateName(vehicle));
@ -1065,7 +1065,7 @@ void RenX_LoggingPlugin::RenX_OnVehicleSpawn(RenX::Server *server, const RenX::T
func = &RenX::Server::sendAdmChan;
Jupiter::String msg = this->vehicleSpawnFmt;
if (msg.isEmpty() == false)
if (msg.isNotEmpty())
{
RenX::TeamType otherTeam = RenX::getEnemy(team);
RenX::processTags(msg, server);
@ -1089,7 +1089,7 @@ void RenX_LoggingPlugin::RenX_OnSpawn(RenX::Server *server, const RenX::PlayerIn
func = &RenX::Server::sendAdmChan;
Jupiter::String msg = this->spawnFmt;
if (msg.isEmpty() == false)
if (msg.isNotEmpty())
{
RenX::processTags(msg, server, player);
msg.replace(RenX::tags->INTERNAL_VICTIM_CHARACTER_TAG, RenX::translateName(character));
@ -1106,7 +1106,7 @@ void RenX_LoggingPlugin::RenX_OnBotJoin(RenX::Server *server, const RenX::Player
func = &RenX::Server::sendAdmChan;
Jupiter::String msg = this->botJoinFmt;
if (msg.isEmpty() == false)
if (msg.isNotEmpty())
{
RenX::processTags(msg, server, player);
(server->*func)(msg);
@ -1122,7 +1122,7 @@ void RenX_LoggingPlugin::RenX_OnVehicleCrate(RenX::Server *server, const RenX::P
func = &RenX::Server::sendAdmChan;
Jupiter::String msg = this->vehicleCrateFmt;
if (msg.isEmpty() == false)
if (msg.isNotEmpty())
{
RenX::processTags(msg, server, player);
msg.replace(RenX::tags->INTERNAL_OBJECT_TAG, RenX::translateName(vehicle));
@ -1139,7 +1139,7 @@ void RenX_LoggingPlugin::RenX_OnTSVehicleCrate(RenX::Server *server, const RenX:
func = &RenX::Server::sendAdmChan;
Jupiter::String msg = this->TSVehicleCrateFmt;
if (msg.isEmpty() == false)
if (msg.isNotEmpty())
{
RenX::processTags(msg, server, player);
msg.replace(RenX::tags->INTERNAL_OBJECT_TAG, RenX::translateName(vehicle));
@ -1156,7 +1156,7 @@ void RenX_LoggingPlugin::RenX_OnRAVehicleCrate(RenX::Server *server, const RenX:
func = &RenX::Server::sendAdmChan;
Jupiter::String msg = this->RAVehicleCrateFmt;
if (msg.isEmpty() == false)
if (msg.isNotEmpty())
{
RenX::processTags(msg, server, player);
msg.replace(RenX::tags->INTERNAL_OBJECT_TAG, RenX::translateName(vehicle));
@ -1173,7 +1173,7 @@ void RenX_LoggingPlugin::RenX_OnDeathCrate(RenX::Server *server, const RenX::Pla
func = &RenX::Server::sendAdmChan;
Jupiter::String msg = this->deathCrateFmt;
if (msg.isEmpty() == false)
if (msg.isNotEmpty())
{
RenX::processTags(msg, server, player);
(server->*func)(msg);
@ -1189,7 +1189,7 @@ void RenX_LoggingPlugin::RenX_OnMoneyCrate(RenX::Server *server, const RenX::Pla
func = &RenX::Server::sendAdmChan;
Jupiter::String msg = this->moneyCrateFmt;
if (msg.isEmpty() == false)
if (msg.isNotEmpty())
{
RenX::processTags(msg, server, player);
msg.replace(RenX::tags->INTERNAL_OBJECT_TAG, Jupiter::StringS::Format("%d", amount));
@ -1206,7 +1206,7 @@ void RenX_LoggingPlugin::RenX_OnCharacterCrate(RenX::Server *server, const RenX:
func = &RenX::Server::sendAdmChan;
Jupiter::String msg = this->characterCrateFmt;
if (msg.isEmpty() == false)
if (msg.isNotEmpty())
{
RenX::processTags(msg, server, player);
msg.replace(RenX::tags->INTERNAL_VICTIM_CHARACTER_TAG, RenX::translateName(character));
@ -1223,7 +1223,7 @@ void RenX_LoggingPlugin::RenX_OnSpyCrate(RenX::Server *server, const RenX::Playe
func = &RenX::Server::sendAdmChan;
Jupiter::String msg = this->spyCrateFmt;
if (msg.isEmpty() == false)
if (msg.isNotEmpty())
{
RenX::processTags(msg, server, player);
msg.replace(RenX::tags->INTERNAL_VICTIM_TEAM_COLOR_TAG, RenX::getTeamColor(RenX::getEnemy(player->team)));
@ -1241,7 +1241,7 @@ void RenX_LoggingPlugin::RenX_OnRefillCrate(RenX::Server *server, const RenX::Pl
func = &RenX::Server::sendAdmChan;
Jupiter::String msg = this->refillCrateFmt;
if (msg.isEmpty() == false)
if (msg.isNotEmpty())
{
RenX::processTags(msg, server, player);
(server->*func)(msg);
@ -1257,7 +1257,7 @@ void RenX_LoggingPlugin::RenX_OnTimeBombCrate(RenX::Server *server, const RenX::
func = &RenX::Server::sendAdmChan;
Jupiter::String msg = this->timeBombCrateFmt;
if (msg.isEmpty() == false)
if (msg.isNotEmpty())
{
RenX::processTags(msg, server, player);
(server->*func)(msg);
@ -1273,7 +1273,7 @@ void RenX_LoggingPlugin::RenX_OnSpeedCrate(RenX::Server *server, const RenX::Pla
func = &RenX::Server::sendAdmChan;
Jupiter::String msg = this->speedCrateFmt;
if (msg.isEmpty() == false)
if (msg.isNotEmpty())
{
RenX::processTags(msg, server, player);
(server->*func)(msg);
@ -1289,7 +1289,7 @@ void RenX_LoggingPlugin::RenX_OnNukeCrate(RenX::Server *server, const RenX::Play
func = &RenX::Server::sendAdmChan;
Jupiter::String msg = this->nukeCrateFmt;
if (msg.isEmpty() == false)
if (msg.isNotEmpty())
{
RenX::processTags(msg, server, player);
(server->*func)(msg);
@ -1305,7 +1305,7 @@ void RenX_LoggingPlugin::RenX_OnAbductionCrate(RenX::Server *server, const RenX:
func = &RenX::Server::sendAdmChan;
Jupiter::String msg = this->abductionCrateFmt;
if (msg.isEmpty() == false)
if (msg.isNotEmpty())
{
RenX::processTags(msg, server, player);
(server->*func)(msg);
@ -1321,7 +1321,7 @@ void RenX_LoggingPlugin::RenX_OnUnspecifiedCrate(RenX::Server *server, const Ren
func = &RenX::Server::sendAdmChan;
Jupiter::String msg = this->unspecifiedCrateFmt;
if (msg.isEmpty() == false)
if (msg.isNotEmpty())
{
RenX::processTags(msg, server, player);
(server->*func)(msg);
@ -1337,7 +1337,7 @@ void RenX_LoggingPlugin::RenX_OnOtherCrate(RenX::Server *server, const RenX::Pla
func = &RenX::Server::sendAdmChan;
Jupiter::String msg = this->otherCrateFmt;
if (msg.isEmpty() == false)
if (msg.isNotEmpty())
{
RenX::processTags(msg, server, player);
msg.replace(RenX::tags->INTERNAL_OBJECT_TAG, type);
@ -1354,7 +1354,7 @@ void RenX_LoggingPlugin::RenX_OnSteal(RenX::Server *server, const RenX::PlayerIn
func = &RenX::Server::sendAdmChan;
Jupiter::String msg = this->stealNoOwnerFmt;
if (msg.isEmpty() == false)
if (msg.isNotEmpty())
{
RenX::processTags(msg, server, player);
msg.replace(RenX::tags->INTERNAL_OBJECT_TAG, RenX::translateName(vehicle));
@ -1371,7 +1371,7 @@ void RenX_LoggingPlugin::RenX_OnSteal(RenX::Server *server, const RenX::PlayerIn
func = &RenX::Server::sendAdmChan;
Jupiter::String msg = this->stealFmt;
if (msg.isEmpty() == false)
if (msg.isNotEmpty())
{
RenX::processTags(msg, server, player, victim);
msg.replace(RenX::tags->INTERNAL_OBJECT_TAG, RenX::translateName(vehicle));
@ -1388,7 +1388,7 @@ void RenX_LoggingPlugin::RenX_OnDonate(RenX::Server *server, const RenX::PlayerI
func = &RenX::Server::sendAdmChan;
Jupiter::String msg = this->donateFmt;
if (msg.isEmpty() == false)
if (msg.isNotEmpty())
{
RenX::processTags(msg, server, donor, player);
msg.replace(RenX::tags->INTERNAL_OBJECT_TAG, Jupiter::StringS::Format("%.0f", amount));
@ -1417,7 +1417,7 @@ void RenX_LoggingPlugin::RenX_OnDestroy(RenX::Server *server, const Jupiter::Rea
msg = this->destroyVehicleFmt2;
break;
}
if (msg.isEmpty() == false)
if (msg.isNotEmpty())
{
RenX::processTags(msg, server);
msg.replace(RenX::tags->INTERNAL_NAME_TAG, RenX::translateName(killer));
@ -1468,7 +1468,7 @@ void RenX_LoggingPlugin::RenX_OnGameOver(RenX::Server *server, RenX::WinType win
else
msg = this->gameOverFmt;
if (msg.isEmpty() == false && team != RenX::TeamType::None)
if (msg.isNotEmpty() && team != RenX::TeamType::None)
{
msg.replace(RenX::tags->INTERNAL_TEAM_COLOR_TAG, RenX::getTeamColor(team));
msg.replace(RenX::tags->INTERNAL_TEAM_SHORT_TAG, RenX::getTeamName(team));
@ -1485,7 +1485,7 @@ void RenX_LoggingPlugin::RenX_OnGameOver(RenX::Server *server, RenX::WinType win
msg = this->gameOverScoreFmt;
if (team == RenX::TeamType::None)
{
if (msg.isEmpty() == false)
if (msg.isNotEmpty())
{
msg.replace(RenX::tags->INTERNAL_TEAM_COLOR_TAG, RenX::getTeamColor(RenX::TeamType::GDI));
msg.replace(RenX::tags->INTERNAL_TEAM_SHORT_TAG, RenX::getTeamName(RenX::TeamType::GDI));
@ -1499,7 +1499,7 @@ void RenX_LoggingPlugin::RenX_OnGameOver(RenX::Server *server, RenX::WinType win
(server->*func)(msg);
}
}
else if (msg.isEmpty() == false)
else if (msg.isNotEmpty())
{
msg.replace(RenX::tags->INTERNAL_TEAM_COLOR_TAG, RenX::getTeamColor(team));
msg.replace(RenX::tags->INTERNAL_TEAM_SHORT_TAG, RenX::getTeamName(team));
@ -1523,7 +1523,7 @@ void RenX_LoggingPlugin::RenX_OnGame(RenX::Server *server, const Jupiter::Readab
func = &RenX::Server::sendAdmChan;
Jupiter::String msg = this->gameFmt;
if (msg.isEmpty() == false)
if (msg.isNotEmpty())
{
RenX::processTags(msg, server);
msg.replace(RenX::tags->INTERNAL_MESSAGE_TAG, raw);
@ -1542,7 +1542,7 @@ void RenX_LoggingPlugin::RenX_OnExecute(RenX::Server *server, const Jupiter::Rea
func = &RenX::Server::sendAdmChan;
Jupiter::String msg = this->executeFmt;
if (msg.isEmpty() == false)
if (msg.isNotEmpty())
{
processTags(msg, server);
msg.replace(RenX::tags->INTERNAL_NAME_TAG, user);
@ -1561,7 +1561,7 @@ void RenX_LoggingPlugin::RenX_OnSubscribe(RenX::Server *server, const Jupiter::R
func = &RenX::Server::sendAdmChan;
Jupiter::String msg = this->subscribeFmt;
if (msg.isEmpty() == false)
if (msg.isNotEmpty())
{
RenX::processTags(msg, server);
msg.replace(RenX::tags->INTERNAL_NAME_TAG, user);
@ -1578,7 +1578,7 @@ void RenX_LoggingPlugin::RenX_OnRCON(RenX::Server *server, const Jupiter::Readab
func = &RenX::Server::sendAdmChan;
Jupiter::String msg = this->rconFmt;
if (msg.isEmpty() == false)
if (msg.isNotEmpty())
{
RenX::processTags(msg, server);
msg.replace(RenX::tags->INTERNAL_MESSAGE_TAG, raw);
@ -1595,7 +1595,7 @@ void RenX_LoggingPlugin::RenX_OnAdminLogin(RenX::Server *server, const RenX::Pla
func = &RenX::Server::sendAdmChan;
Jupiter::String msg = this->adminLoginFmt;
if (msg.isEmpty() == false)
if (msg.isNotEmpty())
{
RenX::processTags(msg, server, player);
(server->*func)(msg);
@ -1611,7 +1611,7 @@ void RenX_LoggingPlugin::RenX_OnAdminGrant(RenX::Server *server, const RenX::Pla
func = &RenX::Server::sendAdmChan;
Jupiter::String msg = this->adminGrantFmt;
if (msg.isEmpty() == false)
if (msg.isNotEmpty())
{
RenX::processTags(msg, server, player);
(server->*func)(msg);
@ -1627,7 +1627,7 @@ void RenX_LoggingPlugin::RenX_OnAdminLogout(RenX::Server *server, const RenX::Pl
func = &RenX::Server::sendAdmChan;
Jupiter::String msg = this->adminLogoutFmt;
if (msg.isEmpty() == false)
if (msg.isNotEmpty())
{
RenX::processTags(msg, server, player);
(server->*func)(msg);
@ -1643,7 +1643,7 @@ void RenX_LoggingPlugin::RenX_OnAdmin(RenX::Server *server, const Jupiter::Reada
func = &RenX::Server::sendAdmChan;
Jupiter::String msg = this->adminFmt;
if (msg.isEmpty() == false)
if (msg.isNotEmpty())
{
RenX::processTags(msg, server);
msg.replace(RenX::tags->INTERNAL_MESSAGE_TAG, raw);
@ -1660,7 +1660,7 @@ void RenX_LoggingPlugin::RenX_OnVoteCall(RenX::Server *server, const RenX::TeamT
func = &RenX::Server::sendAdmChan;
Jupiter::String msg = this->voteCallFmt;
if (msg.isEmpty() == false)
if (msg.isNotEmpty())
{
RenX::processTags(msg, server, player);
msg.replace(RenX::tags->INTERNAL_VICTIM_TEAM_COLOR_TAG, RenX::getTeamColor(team));
@ -1680,7 +1680,7 @@ void RenX_LoggingPlugin::RenX_OnVoteOver(RenX::Server *server, const RenX::TeamT
func = &RenX::Server::sendAdmChan;
Jupiter::String msg = success ? this->voteOverSuccessFmt : this->voteOverFailFmt;
if (msg.isEmpty() == false)
if (msg.isNotEmpty())
{
RenX::processTags(msg, server);
msg.replace(RenX::tags->INTERNAL_OBJECT_TAG, RenX::translateName(type));
@ -1705,7 +1705,7 @@ void RenX_LoggingPlugin::RenX_OnVoteCancel(RenX::Server *server, const RenX::Tea
func = &RenX::Server::sendAdmChan;
Jupiter::String msg = this->voteCancelFmt;
if (msg.isEmpty() == false)
if (msg.isNotEmpty())
{
RenX::processTags(msg, server);
msg.replace(RenX::tags->INTERNAL_OBJECT_TAG, RenX::translateName(type));
@ -1728,7 +1728,7 @@ void RenX_LoggingPlugin::RenX_OnVote(RenX::Server *server, const Jupiter::Readab
func = &RenX::Server::sendAdmChan;
Jupiter::String msg = this->voteFmt;
if (msg.isEmpty() == false)
if (msg.isNotEmpty())
{
RenX::processTags(msg, server);
msg.replace(RenX::tags->INTERNAL_MESSAGE_TAG, raw);
@ -1745,7 +1745,7 @@ void RenX_LoggingPlugin::RenX_OnMapChange(RenX::Server *server, const Jupiter::R
func = &RenX::Server::sendAdmChan;
Jupiter::String msg = this->mapChangeFmt;
if (msg.isEmpty() == false)
if (msg.isNotEmpty())
{
RenX::processTags(msg, server);
msg.replace(RenX::tags->INTERNAL_MESSAGE_TAG, map);
@ -1764,7 +1764,7 @@ void RenX_LoggingPlugin::RenX_OnMapLoad(RenX::Server *server, const Jupiter::Rea
func = &RenX::Server::sendAdmChan;
Jupiter::String msg = this->mapLoadFmt;
if (msg.isEmpty() == false)
if (msg.isNotEmpty())
{
RenX::processTags(msg, server);
msg.replace(RenX::tags->INTERNAL_MESSAGE_TAG, map);
@ -1781,7 +1781,7 @@ void RenX_LoggingPlugin::RenX_OnMapStart(RenX::Server *server, const Jupiter::Re
func = &RenX::Server::sendAdmChan;
Jupiter::String msg = this->mapStartFmt;
if (msg.isEmpty() == false)
if (msg.isNotEmpty())
{
RenX::processTags(msg, server);
msg.replace(RenX::tags->INTERNAL_MESSAGE_TAG, map);
@ -1798,7 +1798,7 @@ void RenX_LoggingPlugin::RenX_OnMap(RenX::Server *server, const Jupiter::Readabl
func = &RenX::Server::sendAdmChan;
Jupiter::String msg = this->mapFmt;
if (msg.isEmpty() == false)
if (msg.isNotEmpty())
{
RenX::processTags(msg, server);
msg.replace(RenX::tags->INTERNAL_MESSAGE_TAG, raw);
@ -1815,7 +1815,7 @@ void RenX_LoggingPlugin::RenX_OnDemoRecord(RenX::Server *server, const RenX::Pla
func = &RenX::Server::sendAdmChan;
Jupiter::String msg = this->demoRecordFmt;
if (msg.isEmpty() == false)
if (msg.isNotEmpty())
{
RenX::processTags(msg, server, player);
(server->*func)(msg);
@ -1831,7 +1831,7 @@ void RenX_LoggingPlugin::RenX_OnDemoRecord(RenX::Server *server, const Jupiter::
func = &RenX::Server::sendAdmChan;
Jupiter::String msg = this->rconDemoRecordFmt;
if (msg.isEmpty() == false)
if (msg.isNotEmpty())
{
RenX::processTags(msg, server);
msg.replace(RenX::tags->nameTag, user);
@ -1848,7 +1848,7 @@ void RenX_LoggingPlugin::RenX_OnDemoRecordStop(RenX::Server *server)
func = &RenX::Server::sendAdmChan;
Jupiter::String msg = this->demoRecordStopFmt;
if (msg.isEmpty() == false)
if (msg.isNotEmpty())
{
RenX::processTags(msg, server);
(server->*func)(msg);
@ -1864,7 +1864,7 @@ void RenX_LoggingPlugin::RenX_OnDemo(RenX::Server *server, const Jupiter::Readab
func = &RenX::Server::sendAdmChan;
Jupiter::String msg = this->demoFmt;
if (msg.isEmpty() == false)
if (msg.isNotEmpty())
{
RenX::processTags(msg, server);
msg.replace(RenX::tags->INTERNAL_MESSAGE_TAG, raw);
@ -1881,7 +1881,7 @@ void RenX_LoggingPlugin::RenX_OnLog(RenX::Server *server, const Jupiter::Readabl
func = &RenX::Server::sendAdmChan;
Jupiter::String msg = this->logFmt;
if (msg.isEmpty() == false)
if (msg.isNotEmpty())
{
RenX::processTags(msg, server);
msg.replace(RenX::tags->INTERNAL_MESSAGE_TAG, raw);
@ -1898,7 +1898,7 @@ void RenX_LoggingPlugin::RenX_OnCommand(RenX::Server *server, const Jupiter::Rea
func = &RenX::Server::sendAdmChan;
Jupiter::String msg = this->commandFmt;
if (msg.isEmpty() == false)
if (msg.isNotEmpty())
{
RenX::processTags(msg, server);
msg.replace(RenX::tags->INTERNAL_MESSAGE_TAG, raw);
@ -1915,7 +1915,7 @@ void RenX_LoggingPlugin::RenX_OnError(RenX::Server *server, const Jupiter::Reada
func = &RenX::Server::sendAdmChan;
Jupiter::String msg = this->errorFmt;
if (msg.isEmpty() == false)
if (msg.isNotEmpty())
{
RenX::processTags(msg, server);
msg.replace(RenX::tags->INTERNAL_MESSAGE_TAG, raw);
@ -1932,7 +1932,7 @@ void RenX_LoggingPlugin::RenX_OnVersion(RenX::Server *server, const Jupiter::Rea
func = &RenX::Server::sendAdmChan;
Jupiter::String msg = this->versionFmt;
if (msg.isEmpty() == false)
if (msg.isNotEmpty())
{
RenX::processTags(msg, server);
msg.replace(RenX::tags->INTERNAL_MESSAGE_TAG, raw);
@ -1949,7 +1949,7 @@ void RenX_LoggingPlugin::RenX_OnAuthorized(RenX::Server *server, const Jupiter::
func = &RenX::Server::sendAdmChan;
Jupiter::String msg = this->authorizedFmt;
if (msg.isEmpty() == false)
if (msg.isNotEmpty())
{
RenX::processTags(msg, server);
msg.replace(RenX::tags->INTERNAL_MESSAGE_TAG, raw);
@ -1966,7 +1966,7 @@ void RenX_LoggingPlugin::RenX_OnOther(RenX::Server *server, char token, const Ju
func = &RenX::Server::sendAdmChan;
Jupiter::String msg = this->otherFmt;
if (msg.isEmpty() == false)
if (msg.isNotEmpty())
{
RenX::processTags(msg, server);
msg.replace(RenX::tags->INTERNAL_MESSAGE_TAG, raw);

20
RenX.Medals/RenX_Medals.cpp

@ -48,7 +48,7 @@ RenX_MedalsPlugin::~RenX_MedalsPlugin()
for (Jupiter::DLList<RenX::PlayerInfo>::Node *n = server->players.getNode(0); n != nullptr; n = n->next)
{
player = n->data;
if (player->uuid.isEmpty() == false && player->isBot == false)
if (player->uuid.isNotEmpty() && player->isBot == false)
{
RenX_MedalsPlugin::medalsFile.set(player->uuid, STRING_LITERAL_AS_REFERENCE("Recs"), player->varData.get(this->getName(), STRING_LITERAL_AS_REFERENCE("Recs")));
RenX_MedalsPlugin::medalsFile.set(player->uuid, STRING_LITERAL_AS_REFERENCE("Noobs"), player->varData.get(this->getName(), STRING_LITERAL_AS_REFERENCE("Noobs")));
@ -109,7 +109,7 @@ void RenX_MedalsPlugin::RenX_ProcessTags(Jupiter::StringType &msg, const RenX::S
void RenX_MedalsPlugin::RenX_OnPlayerCreate(RenX::Server *server, const RenX::PlayerInfo *player)
{
if (player->uuid.isEmpty() == false && player->isBot == false)
if (player->uuid.isNotEmpty() && player->isBot == false)
{
player->varData.set(this->getName(), STRING_LITERAL_AS_REFERENCE("Recs"), RenX_MedalsPlugin::medalsFile.get(player->uuid, STRING_LITERAL_AS_REFERENCE("Recs")));
player->varData.set(this->getName(), STRING_LITERAL_AS_REFERENCE("Noobs"), RenX_MedalsPlugin::medalsFile.get(player->uuid, STRING_LITERAL_AS_REFERENCE("Noobs")));
@ -118,7 +118,7 @@ void RenX_MedalsPlugin::RenX_OnPlayerCreate(RenX::Server *server, const RenX::Pl
void RenX_MedalsPlugin::RenX_OnPlayerDelete(RenX::Server *server, const RenX::PlayerInfo *player)
{
if (player->uuid.isEmpty() == false && player->isBot == false)
if (player->uuid.isNotEmpty() && player->isBot == false)
{
RenX_MedalsPlugin::medalsFile.set(player->uuid, STRING_LITERAL_AS_REFERENCE("Recs"), player->varData.get(this->getName(), STRING_LITERAL_AS_REFERENCE("Recs")));
RenX_MedalsPlugin::medalsFile.set(player->uuid, STRING_LITERAL_AS_REFERENCE("Noobs"), player->varData.get(this->getName(), STRING_LITERAL_AS_REFERENCE("Noobs")));
@ -127,7 +127,7 @@ void RenX_MedalsPlugin::RenX_OnPlayerDelete(RenX::Server *server, const RenX::Pl
void RenX_MedalsPlugin::RenX_OnJoin(RenX::Server *server, const RenX::PlayerInfo *player)
{
if (player->uuid.isEmpty() == false && player->isBot == false)
if (player->uuid.isNotEmpty() && player->isBot == false)
{
int worth = getWorth(player);
Jupiter::INIFile::Section *section = RenX_MedalsPlugin::joinMessageFile.getSection(RenX_MedalsPlugin::firstSection);
@ -186,7 +186,7 @@ void RenX_MedalsPlugin::RenX_OnGameOver(RenX::Server *server, RenX::WinType winT
CongratPlayerData *congratPlayerData;
/** +1 for most kills */
if (mostKills->uuid.isEmpty() == false && mostKills->isBot == false && mostKills->kills > 0)
if (mostKills->uuid.isNotEmpty() && mostKills->isBot == false && mostKills->kills > 0)
{
addRec(mostKills);
@ -198,7 +198,7 @@ void RenX_MedalsPlugin::RenX_OnGameOver(RenX::Server *server, RenX::WinType winT
}
/** +1 for most Vehicle kills */
if (mostVehicleKills->uuid.isEmpty() == false && mostVehicleKills->isBot == false && mostVehicleKills->vehicleKills > 0)
if (mostVehicleKills->uuid.isNotEmpty() && mostVehicleKills->isBot == false && mostVehicleKills->vehicleKills > 0)
{
addRec(mostVehicleKills);
@ -210,7 +210,7 @@ void RenX_MedalsPlugin::RenX_OnGameOver(RenX::Server *server, RenX::WinType winT
}
/** +1 for best K/D ratio */
if (bestKD->uuid.isEmpty() == false && bestKD->isBot == false && RenX::getKillDeathRatio(bestKD) > 1.0)
if (bestKD->uuid.isNotEmpty() && bestKD->isBot == false && RenX::getKillDeathRatio(bestKD) > 1.0)
{
addRec(bestKD);
@ -296,7 +296,7 @@ void RecsGameCommand::create()
void RecsGameCommand::trigger(RenX::Server *source, RenX::PlayerInfo *player, const Jupiter::ReadableString &parameters)
{
if (parameters.size() != 0)
if (parameters.isNotEmpty())
{
RenX::PlayerInfo *target = source->getPlayerByPartName(parameters);
if (target == nullptr)
@ -342,7 +342,7 @@ void RecGameCommand::create()
void RecGameCommand::trigger(RenX::Server *source, RenX::PlayerInfo *player, const Jupiter::ReadableString &parameters)
{
if (parameters.size() != 0)
if (parameters.isNotEmpty())
{
RenX::PlayerInfo *target = source->getPlayerByPartName(parameters);
if (target == nullptr)
@ -388,7 +388,7 @@ void NoobGameCommand::create()
void NoobGameCommand::trigger(RenX::Server *source, RenX::PlayerInfo *player, const Jupiter::ReadableString &parameters)
{
if (parameters.size() != 0)
if (parameters.isNotEmpty())
{
RenX::PlayerInfo *target = source->getPlayerByPartName(parameters);
if (target == nullptr)

18
RenX.ModSystem/RenX_ModSystem.cpp

@ -50,7 +50,7 @@ void RenX_ModSystemPlugin::init()
Jupiter::ReferenceString dotGamePrefix = ".GamePrefix";
Jupiter::String groupName = RenX_ModSystemPlugin::modsFile.get(Jupiter::ReferenceString::empty, STRING_LITERAL_AS_REFERENCE("Default"));
while (groupName.isEmpty() == false)
while (groupName.isNotEmpty())
{
group = new ModGroup();
group->name = groupName;
@ -152,7 +152,7 @@ int RenX_ModSystemPlugin::auth(RenX::Server *server, const RenX::PlayerInfo *pla
if (player->isBot)
return 0;
ModGroup *group;
if (player->uuid.isEmpty() == false)
if (player->uuid.isNotEmpty())
{
Jupiter::INIFile::Section *section = RenX_ModSystemPlugin::modsFile.getSection(player->uuid);
if (section != nullptr)
@ -369,7 +369,7 @@ void RenX_ModSystemPlugin::RenX_OnAdminGrant(RenX::Server *server, const RenX::P
void RenX_ModSystemPlugin::RenX_OnAdminLogout(RenX::Server *server, const RenX::PlayerInfo *player)
{
ModGroup *group = nullptr;
int access;
int access = RenX_ModSystemPlugin::groups.size() == 0 ? 0 : RenX_ModSystemPlugin::groups.get(0)->access;
if (player->adminType.equals("administrator"))
{
access = 2;
@ -416,7 +416,7 @@ void AuthIRCCommand::create()
void AuthIRCCommand::trigger(IRC_Bot *source, const Jupiter::ReadableString &channel, const Jupiter::ReadableString &nick, const Jupiter::ReadableString &parameters)
{
if (parameters.isEmpty() == false)
if (parameters.isNotEmpty())
{
Jupiter::IRC::Client::Channel *chan = source->getChannel(channel);
if (chan != nullptr)
@ -486,7 +486,7 @@ void DeAuthIRCCommand::create()
void DeAuthIRCCommand::trigger(IRC_Bot *source, const Jupiter::ReadableString &channel, const Jupiter::ReadableString &nick, const Jupiter::ReadableString &parameters)
{
if (parameters.isEmpty() == false)
if (parameters.isNotEmpty())
{
Jupiter::IRC::Client::Channel *chan = source->getChannel(channel);
if (chan != nullptr)
@ -788,7 +788,7 @@ void ForceAuthIRCCommand::create()
void ForceAuthIRCCommand::trigger(IRC_Bot *source, const Jupiter::ReadableString &channel, const Jupiter::ReadableString &nick, const Jupiter::ReadableString &parameters)
{
if (parameters.isEmpty() == false)
if (parameters.isNotEmpty())
{
Jupiter::IRC::Client::Channel *chan = source->getChannel(channel);
if (chan != nullptr)
@ -908,7 +908,7 @@ void AuthGameCommand::create()
void AuthGameCommand::trigger(RenX::Server *source, RenX::PlayerInfo *player, const Jupiter::ReadableString &parameters)
{
if (parameters.isEmpty() == false)
if (parameters.isNotEmpty())
{
RenX::PlayerInfo *target = source->getPlayerByPartName(parameters);
if (target == nullptr)
@ -958,7 +958,7 @@ void ATMGameCommand::create()
void ATMGameCommand::trigger(RenX::Server *server, RenX::PlayerInfo *player, const Jupiter::ReadableString &parameters)
{
if (parameters.isEmpty() == false)
if (parameters.isNotEmpty())
{
RenX::PlayerInfo *target;
RenX_ModSystemPlugin::ModGroup *group = pluginInstance.getDefaultATMGroup();
@ -1024,7 +1024,7 @@ void ForceAuthGameCommand::create()
void ForceAuthGameCommand::trigger(RenX::Server *source, RenX::PlayerInfo *player, const Jupiter::ReadableString &parameters)
{
if (parameters.isEmpty() == false)
if (parameters.isNotEmpty())
{
RenX::PlayerInfo *target = source->getPlayerByPartName(parameters);
if (target == nullptr)

20
RenX.SetJoin/RenX_SetJoin.cpp

@ -1,5 +1,5 @@
/**
* Copyright (C) 2014 Justin James.
* Copyright (C) 2014-2015 Justin James.
*
* This license must be preserved.
* Any applications, libraries, or code which make any use of any
@ -25,10 +25,10 @@ const Jupiter::ReferenceString configSection(STRING_LITERAL_AS_REFERENCE("RenX.S
void RenX_SetJoinPlugin::RenX_OnJoin(RenX::Server *server, const RenX::PlayerInfo *player)
{
if (player->uuid.isEmpty() == false)
if (player->uuid.isNotEmpty())
{
const Jupiter::ReadableString &setjoin = Jupiter::IRC::Client::Config->get(configSection, player->uuid);
if (setjoin.isEmpty() == false)
if (setjoin.isNotEmpty())
server->sendMessage(Jupiter::StringS::Format("[%.*s] %.*s", player->name.size(), player->name.ptr(), setjoin.size(), setjoin.ptr()));
}
}
@ -43,10 +43,10 @@ void ViewJoinGameCommand::create()
void ViewJoinGameCommand::trigger(RenX::Server *source, RenX::PlayerInfo *player, const Jupiter::ReadableString &parameters)
{
if (player->uuid.isEmpty() == false)
if (player->uuid.isNotEmpty())
{
const Jupiter::ReadableString &setjoin = Jupiter::IRC::Client::Config->get(configSection, player->uuid);
if (setjoin.isEmpty() == false)
if (setjoin.isNotEmpty())
source->sendMessage(player, Jupiter::StringS::Format("[%.*s] %.*s", player->name.size(), player->name.ptr(), setjoin.size(), setjoin.ptr()));
else source->sendMessage(player, STRING_LITERAL_AS_REFERENCE("Error: No setjoin found."));
}
@ -71,10 +71,10 @@ void ShowJoinGameCommand::create()
void ShowJoinGameCommand::trigger(RenX::Server *source, RenX::PlayerInfo *player, const Jupiter::ReadableString &parameters)
{
if (player->uuid.isEmpty() == false)
if (player->uuid.isNotEmpty())
{
const Jupiter::ReadableString &setjoin = Jupiter::IRC::Client::Config->get(configSection, player->uuid);
if (setjoin.isEmpty() == false)
if (setjoin.isNotEmpty())
source->sendMessage(Jupiter::StringS::Format("[%.*s] %.*s", player->name.size(), player->name.ptr(), setjoin.size(), setjoin.ptr()));
else source->sendMessage(player, STRING_LITERAL_AS_REFERENCE("Error: No setjoin found."));
}
@ -101,7 +101,7 @@ void DelJoinGameCommand::create()
void DelJoinGameCommand::trigger(RenX::Server *source, RenX::PlayerInfo *player, const Jupiter::ReadableString &)
{
if (player->uuid.isEmpty() == false)
if (player->uuid.isNotEmpty())
{
if (Jupiter::IRC::Client::Config->remove(configSection, player->uuid))
source->sendMessage(player, Jupiter::StringS::Format("%.*s, your join message has been removed.", player->name.size(), player->name.ptr()));
@ -128,9 +128,9 @@ void SetJoinGameCommand::create()
void SetJoinGameCommand::trigger(RenX::Server *source, RenX::PlayerInfo *player, const Jupiter::ReadableString &parameters)
{
if (player->uuid.isEmpty() == false)
if (player->uuid.isNotEmpty())
{
if (parameters.isEmpty() == false)
if (parameters.isNotEmpty())
{
Jupiter::IRC::Client::Config->set(configSection, player->uuid, parameters);
Jupiter::IRC::Client::Config->sync();

10
RenX.Warn/RenX_Warn.cpp

@ -1,5 +1,5 @@
/**
* Copyright (C) 2014 Justin James.
* Copyright (C) 2014-2015 Justin James.
*
* This license must be preserved.
* Any applications, libraries, or code which make any use of any
@ -48,7 +48,7 @@ void WarnIRCCommand::create()
void WarnIRCCommand::trigger(IRC_Bot *source, const Jupiter::ReadableString &channel, const Jupiter::ReadableString &nick, const Jupiter::ReadableString &parameters)
{
if (parameters.isEmpty() == false)
if (parameters.isNotEmpty())
{
Jupiter::IRC::Client::Channel *chan = source->getChannel(channel);
if (chan != nullptr)
@ -119,7 +119,7 @@ void PardonIRCCommand::create()
void PardonIRCCommand::trigger(IRC_Bot *source, const Jupiter::ReadableString &channel, const Jupiter::ReadableString &nick, const Jupiter::ReadableString &parameters)
{
if (parameters.isEmpty() == false)
if (parameters.isNotEmpty())
{
Jupiter::IRC::Client::Channel *chan = source->getChannel(channel);
if (chan != nullptr)
@ -171,7 +171,7 @@ void WarnGameCommand::create()
void WarnGameCommand::trigger(RenX::Server *source, RenX::PlayerInfo *player, const Jupiter::ReadableString &parameters)
{
if (parameters.isEmpty() == false)
if (parameters.isNotEmpty())
{
RenX::PlayerInfo *target = source->getPlayerByPartName(parameters);
if (target != nullptr)
@ -223,7 +223,7 @@ void PardonGameCommand::create()
void PardonGameCommand::trigger(RenX::Server *source, RenX::PlayerInfo *player, const Jupiter::ReadableString &parameters)
{
if (parameters.isEmpty() == false)
if (parameters.isNotEmpty())
{
RenX::PlayerInfo *target = source->getPlayerByPartName(parameters);
if (target != nullptr)

6
SetJoin/SetJoin.cpp

@ -1,5 +1,5 @@
/**
* Copyright (C) 2014 Justin James.
* Copyright (C) 2014-2015 Justin James.
*
* This license must be preserved.
* Any applications, libraries, or code which make any use of any
@ -24,7 +24,7 @@
void SetJoinPlugin::OnJoin(Jupiter::IRC::Client *server, const Jupiter::ReadableString &chan, const Jupiter::ReadableString &nick)
{
const Jupiter::ReadableString &setjoin = server->Config->get(STRING_LITERAL_AS_REFERENCE("SetJoins"), nick);
if (setjoin.isEmpty() == false)
if (setjoin.isNotEmpty())
{
if (setjoin == nullptr)
server->sendNotice(nick, STRING_LITERAL_AS_REFERENCE("No setjoin has been set for you. To set one, use the !setjoin command"));
@ -42,7 +42,7 @@ void SetJoinIRCCommand::create()
void SetJoinIRCCommand::trigger(IRC_Bot *source, const Jupiter::ReadableString &channel, const Jupiter::ReadableString &nick, const Jupiter::ReadableString &parameters)
{
if (parameters.size() != 0)
if (parameters.isNotEmpty())
{
source->Config->set(STRING_LITERAL_AS_REFERENCE("SetJoins"), nick, parameters);
source->Config->sync();

Loading…
Cancel
Save