mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/LCEMP-Server.git
synced 2026-05-22 14:06:33 +00:00
24 lines
626 B
C++
24 lines
626 B
C++
#include "stdafx.h"
|
|
#include "PardonCommand.h"
|
|
#include "ServerCommand.h"
|
|
#include "../../Minecraft.Client/ConsoleInputSource.h"
|
|
#include "../../Minecraft.Client/MinecraftServer.h"
|
|
#include "../Core/ServerLists.h"
|
|
#include "ServerTextList.h"
|
|
|
|
#include <sstream>
|
|
|
|
void PardonCommand::execute(const wstring& args, ConsoleInputSource *src, MinecraftServer *server)
|
|
{
|
|
wstringstream ss(args);
|
|
wstring playerName;
|
|
if (!(ss >> playerName))
|
|
{
|
|
src->warn(L"Usage: /pardon <player>");
|
|
return;
|
|
}
|
|
|
|
ServerLists_GetBannedPlayers()->remove(playerName);
|
|
ServerCommand::notifyAdmins(src, server, L"Unbanned player " + playerName);
|
|
}
|