summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDipesh Amin <yaypunkrock@gmail.com>2011-09-05 10:52:12 +0100
committerDipesh Amin <yaypunkrock@gmail.com>2011-09-05 10:52:12 +0100
commit618146825663cb46a2fb17ed8874740bf7654de5 (patch)
tree634438433b4bbd7bfaf045fc13380a6fd15b3964
parentb648f6afac3de657992c4f4eea46f0c83c665644 (diff)
downloadmanamarket-618146825663cb46a2fb17ed8874740bf7654de5.tar.gz
manamarket-618146825663cb46a2fb17ed8874740bf7654de5.tar.bz2
manamarket-618146825663cb46a2fb17ed8874740bf7654de5.tar.xz
manamarket-618146825663cb46a2fb17ed8874740bf7654de5.zip
Lets a lvl 10 user use the !listusers command.
-rwxr-xr-xmain.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/main.py b/main.py
index 2a8733e..7477466 100755
--- a/main.py
+++ b/main.py
@@ -169,9 +169,9 @@ def process_whisper(nick, msg, mapserv):
elif broken_string[1] == '!getback':
mapserv.sendall(whisper(nick, "!getback <uid> - Allows you to retrieve an item that has expired or you no longer wish to sell."))
elif user != -10:
- if int(user.get('accesslevel')) == 20 and broken_string[1] == '!listusers':
+ if int(user.get('accesslevel')) >= 10 and broken_string[1] == '!listusers':
mapserv.sendall(whisper(nick, "!listusers - Lists all users which have a special accesslevel, e.g. they are blocked, seller or admin"))
- elif int(user.get('accesslevel')) == 20 and broken_string[1] == '!adduser':
+ elif int(user.get('accesslevel')) >= 10 and broken_string[1] == '!adduser':
mapserv.sendall(whisper(nick, "!adduser <access level> <slots> <name> - Add a user to the bot, a seller should be added with access level 5."))
elif int(user.get('accesslevel')) == 20 and broken_string[1] == '!setslots':
mapserv.sendall(whisper(nick, "!setslots <slots> <name> - Sets the number of slots available to a given user."))
@@ -248,7 +248,7 @@ def process_whisper(nick, msg, mapserv):
if user == -10:
return
- if int(user.get("accesslevel")) != 20:
+ if int(user.get("accesslevel")) < 10:
mapserv.sendall(whisper(nick, "You don't have the correct permissions."))
return