mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Fixed/extended/modified ban stuff to be good for inclusion
This commit is contained in:
parent
7aa72c56b6
commit
e40da2341c
5 changed files with 96 additions and 35 deletions
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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue