Browse Source

Adjusted format specifiers for steamid.

pull/3/head
JustinAJ 10 years ago
parent
commit
bee33ed226
  1. BIN
      Release/Plugins/RenX.Core.lib
  2. 4
      RenX.Commands/RenX_Commands.cpp
  3. 4
      RenX.Core/RenX_Server.cpp
  4. 2
      RenX.ExcessiveHeadshots/ExcessiveHeadshots.cpp
  5. 2
      RenX.Logging/RenX_Logging.cpp
  6. 8
      RenX.SetJoin/RenX_SetJoin.cpp

BIN
Release/Plugins/RenX.Core.lib

Binary file not shown.

4
RenX.Commands/RenX_Commands.cpp

@ -355,7 +355,7 @@ void PlayerInfoIRCCommand::trigger(IRC_Bot *source, const Jupiter::ReadableStrin
else msg += "IP Not Found" IRCBOLD; else msg += "IP Not Found" IRCBOLD;
} }
if (player->steamid != 0) if (player->steamid != 0)
msg.aformat(" - Steam ID: " IRCBOLD "%llx" IRCBOLD, player->steamid); msg.aformat(" - Steam ID: " IRCBOLD "0x%.8llx" IRCBOLD, player->steamid);
if (player->adminType.size() != 0) if (player->adminType.size() != 0)
{ {
msg += " - Admin Type: " IRCBOLD; msg += " - Admin Type: " IRCBOLD;
@ -412,7 +412,7 @@ void SteamIRCCommand::trigger(IRC_Bot *source, const Jupiter::ReadableString &ch
Jupiter::String &playerName = RenX::getFormattedPlayerName(player); Jupiter::String &playerName = RenX::getFormattedPlayerName(player);
msg.format(IRCCOLOR "03[Steam] " IRCCOLOR "%.*s (ID: %d) ", playerName.size(), playerName.ptr(), player->id); msg.format(IRCCOLOR "03[Steam] " IRCCOLOR "%.*s (ID: %d) ", playerName.size(), playerName.ptr(), player->id);
if (player->steamid != 0) if (player->steamid != 0)
msg.aformat("is using steam ID " IRCBOLD "%llx" IRCBOLD, player->steamid); msg.aformat("is using steam ID " IRCBOLD "0x%.8llx" IRCBOLD, player->steamid);
else msg += "is not using steam."; else msg += "is not using steam.";
source->sendMessage(channel, msg); source->sendMessage(channel, msg);
} }

4
RenX.Core/RenX_Server.cpp

@ -689,7 +689,7 @@ void RenX::Server::processLine(const Jupiter::ReadableString &line)
default: default:
case 0: case 0:
if (player->steamid != 0) if (player->steamid != 0)
player->uuid.format("%llx", player->steamid); player->uuid.format("0x%.8llx", player->steamid);
break; break;
case 1: case 1:
player->uuid = player->name; player->uuid = player->name;
@ -792,7 +792,7 @@ void RenX::Server::processLine(const Jupiter::ReadableString &line)
default: default:
case 0: case 0:
if (player->steamid != 0) if (player->steamid != 0)
player->uuid.format("%llx", player->steamid); player->uuid.format("0x%.8llx", player->steamid);
break; break;
case 1: case 1:
player->uuid = player->name; player->uuid = player->name;

2
RenX.ExcessiveHeadshots/ExcessiveHeadshots.cpp

@ -55,7 +55,7 @@ void RenX_ExcessiveHeadshotsPlugin::RenX_OnKill(RenX::Server *server, const RenX
{ {
server->kickPlayer(player); server->kickPlayer(player);
server->sendPubChan(IRCCOLOR "13[Aimbot]" IRCCOLOR " %.*s was banned from the server! Kills: %u - Deaths: %u - Headshots: %u", player->name.size(), player->name.ptr(), player->kills, player->deaths, player->headshots); server->sendPubChan(IRCCOLOR "13[Aimbot]" IRCCOLOR " %.*s was banned from the server! Kills: %u - Deaths: %u - Headshots: %u", player->name.size(), player->name.ptr(), player->kills, player->deaths, player->headshots);
server->sendAdmChan(IRCCOLOR "13[Aimbot]" IRCCOLOR " %.*s was banned from the server! Kills: %u - Deaths: %u - Headshots: %u - IP: " IRCBOLD "%.*s" IRCBOLD " - Steam ID: " IRCBOLD "%llx" IRCBOLD, player->name.size(), player->name.ptr(), player->kills, player->deaths, player->headshots, player->ip.size(), player->ip.ptr(), player->steamid); server->sendAdmChan(IRCCOLOR "13[Aimbot]" IRCCOLOR " %.*s was banned from the server! Kills: %u - Deaths: %u - Headshots: %u - IP: " IRCBOLD "%.*s" IRCBOLD " - Steam ID: " IRCBOLD "0x%.8llx" IRCBOLD, player->name.size(), player->name.ptr(), player->kills, player->deaths, player->headshots, player->ip.size(), player->ip.ptr(), player->steamid);
} }
} }
} }

2
RenX.Logging/RenX_Logging.cpp

@ -63,7 +63,7 @@ void RenX_LoggingPlugin::RenX_OnJoin(RenX::Server *server, const RenX::PlayerInf
if (player->steamid == 0) if (player->steamid == 0)
server->sendAdmChan(IRCCOLOR "12[Join]" IRCCOLOR "%.*s " IRCBOLD "%.*s" IRCBOLD " joined the game fighting for the %.*s from " IRCBOLD "%.*s" IRCBOLD ", but is not using Steam.", teamColor.size(), teamColor.ptr(), player->name.size(), player->name.ptr(), teamName.size(), teamName.ptr(), player->ip.size(), player->ip.ptr()); server->sendAdmChan(IRCCOLOR "12[Join]" IRCCOLOR "%.*s " IRCBOLD "%.*s" IRCBOLD " joined the game fighting for the %.*s from " IRCBOLD "%.*s" IRCBOLD ", but is not using Steam.", teamColor.size(), teamColor.ptr(), player->name.size(), player->name.ptr(), teamName.size(), teamName.ptr(), player->ip.size(), player->ip.ptr());
else else
server->sendAdmChan(IRCCOLOR "12[Join]" IRCCOLOR "%.*s " IRCBOLD "%.*s" IRCBOLD " joined the game fighting for the %.*s from " IRCBOLD "%.*s" IRCBOLD " using Steam ID " IRCBOLD "%llx" IRCBOLD ".", teamColor.size(), teamColor.ptr(), player->name.size(), player->name.ptr(), teamName.size(), teamName.ptr(), player->ip.size(), player->ip.ptr(), player->steamid); server->sendAdmChan(IRCCOLOR "12[Join]" IRCCOLOR "%.*s " IRCBOLD "%.*s" IRCBOLD " joined the game fighting for the %.*s from " IRCBOLD "%.*s" IRCBOLD " using Steam ID " IRCBOLD "0x%.8llx" IRCBOLD ".", teamColor.size(), teamColor.ptr(), player->name.size(), player->name.ptr(), teamName.size(), teamName.ptr(), player->ip.size(), player->ip.ptr(), player->steamid);
} }
void RenX_LoggingPlugin::RenX_OnPart(RenX::Server *server, const RenX::PlayerInfo *player) void RenX_LoggingPlugin::RenX_OnPart(RenX::Server *server, const RenX::PlayerInfo *player)

8
RenX.SetJoin/RenX_SetJoin.cpp

@ -27,7 +27,7 @@ void RenX_SetJoinPlugin::RenX_OnJoin(RenX::Server *server, const RenX::PlayerInf
{ {
if (player->steamid != 0) if (player->steamid != 0)
{ {
const Jupiter::ReadableString &setjoin = Jupiter::IRC::Client::Config->get(configSection, Jupiter::StringS::Format("%llx", player->steamid)); const Jupiter::ReadableString &setjoin = Jupiter::IRC::Client::Config->get(configSection, Jupiter::StringS::Format("0x%.8llx", player->steamid));
if (setjoin.isEmpty() == false) if (setjoin.isEmpty() == false)
server->sendMessage(Jupiter::StringS::Format("[%.*s] %.*s", player->name.size(), player->name.ptr(), setjoin.size(), setjoin.ptr())); server->sendMessage(Jupiter::StringS::Format("[%.*s] %.*s", player->name.size(), player->name.ptr(), setjoin.size(), setjoin.ptr()));
} }
@ -45,7 +45,7 @@ void ViewJoinGameCommand::trigger(RenX::Server *source, RenX::PlayerInfo *player
{ {
if (player->steamid != 0) if (player->steamid != 0)
{ {
const Jupiter::ReadableString &setjoin = Jupiter::IRC::Client::Config->get(configSection, Jupiter::StringS::Format("%llx", player->steamid)); const Jupiter::ReadableString &setjoin = Jupiter::IRC::Client::Config->get(configSection, Jupiter::StringS::Format("0x%.8llx", player->steamid));
if (setjoin.isEmpty() == false) if (setjoin.isEmpty() == false)
source->sendMessage(Jupiter::StringS::Format("[%.*s] %.*s", player->name.size(), player->name.ptr(), setjoin.size(), setjoin.ptr())); 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.")); else source->sendMessage(player, STRING_LITERAL_AS_REFERENCE("Error: No setjoin found."));
@ -75,7 +75,7 @@ void DelJoinGameCommand::trigger(RenX::Server *source, RenX::PlayerInfo *player,
{ {
if (player->steamid != 0) if (player->steamid != 0)
{ {
if (Jupiter::IRC::Client::Config->remove(configSection, Jupiter::StringS::Format("%llx", player->steamid))) if (Jupiter::IRC::Client::Config->remove(configSection, Jupiter::StringS::Format("0x%.8llx", player->steamid)))
source->sendMessage(player, Jupiter::StringS::Format("%.*s, your join message has been removed.", player->name.size(), player->name.ptr())); source->sendMessage(player, Jupiter::StringS::Format("%.*s, your join message has been removed.", player->name.size(), player->name.ptr()));
else source->sendMessage(player, STRING_LITERAL_AS_REFERENCE("Error: Setjoin not found.")); else source->sendMessage(player, STRING_LITERAL_AS_REFERENCE("Error: Setjoin not found."));
} }
@ -104,7 +104,7 @@ void SetJoinGameCommand::trigger(RenX::Server *source, RenX::PlayerInfo *player,
{ {
if (parameters.isEmpty() == false) if (parameters.isEmpty() == false)
{ {
Jupiter::IRC::Client::Config->set(configSection, Jupiter::StringS::Format("%llx", player->steamid), parameters); Jupiter::IRC::Client::Config->set(configSection, Jupiter::StringS::Format("0x%.8llx", player->steamid), parameters);
Jupiter::IRC::Client::Config->sync(); Jupiter::IRC::Client::Config->sync();
source->sendMessage(player, Jupiter::StringS::Format("%.*s, your join message is now: %.*s", player->name.size(), player->name.ptr(), parameters.size(), parameters.ptr())); source->sendMessage(player, Jupiter::StringS::Format("%.*s, your join message is now: %.*s", player->name.size(), player->name.ptr(), parameters.size(), parameters.ptr()));
} }

Loading…
Cancel
Save