1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-01 17:38:41 +00:00

added ipban support

commands:
/#ipban <nick>
/#ipunban <ip>
This commit is contained in:
Constantin Wenger 2011-08-12 01:13:42 +02:00
parent 371af9c241
commit 5784c14ab7
11 changed files with 271 additions and 1 deletions

View file

@ -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;
}