mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 08:35:20 +02:00
Fixed/extended/modified ban stuff to be good for inclusion
This commit is contained in:
13
src/server.h
13
src/server.h
@@ -456,18 +456,23 @@ public:
|
||||
g_settings.updateConfigFile(m_configpath.c_str());
|
||||
}
|
||||
|
||||
void setIpBanned(std::string ip)
|
||||
void setIpBanned(const std::string &ip, const std::string &name)
|
||||
{
|
||||
m_banmanager.add(ip);
|
||||
m_banmanager.add(ip, name);
|
||||
return;
|
||||
}
|
||||
|
||||
void unsetIpBanned(std::string ip)
|
||||
void unsetIpBanned(const std::string &ip_or_name)
|
||||
{
|
||||
m_banmanager.remove(ip);
|
||||
m_banmanager.remove(ip_or_name);
|
||||
return;
|
||||
}
|
||||
|
||||
std::string getBanDescription(const std::string &ip_or_name)
|
||||
{
|
||||
return m_banmanager.getBanDescription(ip_or_name);
|
||||
}
|
||||
|
||||
con::Peer* getPeerNoEx(u16 peer_id)
|
||||
{
|
||||
return m_con.GetPeerNoEx(peer_id);
|
||||
|
Reference in New Issue
Block a user