mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/LCEMP-Server.git
synced 2026-05-31 19:54:38 +00:00
Initial commit
This commit is contained in:
23
Commands/PardonIpCommand.cpp
Normal file
23
Commands/PardonIpCommand.cpp
Normal file
@@ -0,0 +1,23 @@
|
||||
#include "stdafx.h"
|
||||
#include "PardonIpCommand.h"
|
||||
#include "ServerCommand.h"
|
||||
#include "../../Minecraft.Client/ConsoleInputSource.h"
|
||||
#include "../../Minecraft.Client/MinecraftServer.h"
|
||||
#include "../Core/ServerLists.h"
|
||||
#include "ServerTextList.h"
|
||||
|
||||
#include <sstream>
|
||||
|
||||
void PardonIpCommand::execute(const wstring& args, ConsoleInputSource *src, MinecraftServer *server)
|
||||
{
|
||||
wstringstream ss(args);
|
||||
wstring ip;
|
||||
if (!(ss >> ip))
|
||||
{
|
||||
src->warn(L"Usage: /pardon-ip <ip>");
|
||||
return;
|
||||
}
|
||||
|
||||
ServerLists_GetBannedIPs()->remove(ip);
|
||||
ServerCommand::notifyAdmins(src, server, L"Unbanned IP address " + ip);
|
||||
}
|
||||
Reference in New Issue
Block a user