Browse Source

Updated Jupiter submodule; fixed delmod command

pull/15/head
Jessica James 4 years ago
parent
commit
2205de18ff
  1. 2
      src/Jupiter
  2. 6
      src/Plugins/RenX/RenX.ModSystem/RenX_ModSystem.cpp

2
src/Jupiter

@ -1 +1 @@
Subproject commit ffe56f8f1daabd843b23a1e58db85ea375b23bf8 Subproject commit 84455254c6fd4918e8f87f8804c0139bfc4487d4

6
src/Plugins/RenX/RenX.ModSystem/RenX_ModSystem.cpp

@ -758,14 +758,14 @@ void DelIRCCommand::trigger(IRC_Bot *source, const Jupiter::ReadableString &chan
player = server->getPlayerByPartName(parameters); player = server->getPlayerByPartName(parameters);
if (player == nullptr) if (player == nullptr)
{ {
if (pluginInstance.modsFile.remove(parameters)) if (pluginInstance.modsFile.removeSection(parameters))
source->sendNotice(nick, "Player has been removed from the moderator list."_jrs); source->sendNotice(nick, "Player has been removed from the moderator list."_jrs);
else else
{ {
for (auto& section : pluginInstance.modsFile.getSections()) for (auto& section : pluginInstance.modsFile.getSections())
{ {
if (section.second.get("Name"_jrs).equalsi(parameters)) { if (section.second.get("Name"_jrs).equalsi(parameters)) {
if (pluginInstance.modsFile.remove(section.first)) if (pluginInstance.modsFile.removeSection(section.first))
source->sendNotice(nick, "Player has been removed from the moderator list."_jrs); source->sendNotice(nick, "Player has been removed from the moderator list."_jrs);
else else
source->sendNotice(nick, "Error: Unknown error occurred."_jrs); source->sendNotice(nick, "Error: Unknown error occurred."_jrs);
@ -779,7 +779,7 @@ void DelIRCCommand::trigger(IRC_Bot *source, const Jupiter::ReadableString &chan
} }
else if (player->isBot) else if (player->isBot)
source->sendNotice(nick, "Error: A bot can not be a moderator."_jrs); source->sendNotice(nick, "Error: A bot can not be a moderator."_jrs);
else if (pluginInstance.modsFile.remove(player->uuid)) else if (pluginInstance.modsFile.removeSection(player->uuid))
source->sendNotice(nick, "Player has been removed from the moderator list."_jrs); source->sendNotice(nick, "Player has been removed from the moderator list."_jrs);
else else
source->sendNotice(nick, "Player is not in the moderator list."_jrs); source->sendNotice(nick, "Player is not in the moderator list."_jrs);

Loading…
Cancel
Save