diff options
author | Dipesh Amin <yaypunkrock@gmail.com> | 2011-08-24 15:17:15 +0100 |
---|---|---|
committer | Dipesh Amin <yaypunkrock@gmail.com> | 2011-08-24 15:17:15 +0100 |
commit | cb31905b26679c5a0c9a7335943d0d1afe4547bc (patch) | |
tree | cc7083bb9fbba4f4a85e91e3d239ba4a5ca51162 /main.py | |
parent | 80d3df45dc769fe7e553caaea2ab938e94cbf07b (diff) | |
download | manamarket-cb31905b26679c5a0c9a7335943d0d1afe4547bc.tar.gz manamarket-cb31905b26679c5a0c9a7335943d0d1afe4547bc.tar.bz2 manamarket-cb31905b26679c5a0c9a7335943d0d1afe4547bc.tar.xz manamarket-cb31905b26679c5a0c9a7335943d0d1afe4547bc.zip |
Let a blocked user retrieve items/money.
Diffstat (limited to 'main.py')
-rwxr-xr-x | main.py | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -44,8 +44,9 @@ def process_whisper(nick, msg, mapserv): if user != -10: if int(user.get("accesslevel")) == -1: # A user who has been blocked for abuse. - mapserv.sendall(whisper(nick, "You can no longer use the bot. If you feel this is in error, please contact <administrator>.")) - return + if int(user.get("used_slots")) == 0 and int(user.get("money")) == 0: + mapserv.sendall(whisper(nick, "You can no longer use the bot. If you feel this is in error, please contact <administrator>.")) + return if msg == "!list": # Sends the list of items for sale. @@ -489,7 +490,7 @@ def process_whisper(nick, msg, mapserv): mapserv.sendall(whisper(nick, "Syntax incorrect.")) return - if int(user.get("accesslevel")) < 5: + if int(user.get("accesslevel")) < 5 and int(user.get("accesslevel")) > 0: mapserv.sendall(whisper(nick, "You don't have the correct permissions.")) return |