mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/LCEMP-Server.git
synced 2026-05-25 03:57:21 +00:00
Initial commit
This commit is contained in:
23
Commands/PardonCommand.cpp
Normal file
23
Commands/PardonCommand.cpp
Normal file
@@ -0,0 +1,23 @@
|
||||
#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);
|
||||
}
|
||||
Reference in New Issue
Block a user