aboutsummaryrefslogtreecommitdiff
path: root/src/auth.cpp
diff options
context:
space:
mode:
authorConstantin Wenger <constantin.wenger@googlemail.com>2011-08-12 01:13:42 +0200
committerConstantin Wenger <constantin.wenger@googlemail.com>2011-08-12 03:37:18 +0200
commit5784c14ab798847248e4682ef28434767a549fc6 (patch)
tree20fc0f28a44bb5fc44c7bcf3676d7197aeac65b7 /src/auth.cpp
parent371af9c241c3064d64e1109098aa5471e545d32c (diff)
downloadminetest-5784c14ab798847248e4682ef28434767a549fc6.tar.gz
minetest-5784c14ab798847248e4682ef28434767a549fc6.tar.bz2
minetest-5784c14ab798847248e4682ef28434767a549fc6.zip
added ipban support
commands: /#ipban <nick> /#ipunban <ip>
Diffstat (limited to 'src/auth.cpp')
-rw-r--r--src/auth.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/auth.cpp b/src/auth.cpp
index 5d61243c6..dc740411b 100644
--- a/src/auth.cpp
+++ b/src/auth.cpp
@@ -40,6 +40,8 @@ std::string privsToString(u64 privs)
os<<"privs,";
if(privs & PRIV_SHOUT)
os<<"shout,";
+ if(privs & PRIV_BAN)
+ os<<"ban,";
if(os.tellp())
{
// Drop the trailing comma. (Why on earth can't
@@ -70,6 +72,8 @@ u64 stringToPrivs(std::string str)
privs |= PRIV_PRIVS;
else if(s == "shout")
privs |= PRIV_SHOUT;
+ else if(s == "ban")
+ privs |= PRIV_BAN;
else
return PRIV_INVALID;
}