From b648f6afac3de657992c4f4eea46f0c83c665644 Mon Sep 17 00:00:00 2001 From: Dipesh Amin Date: Mon, 5 Sep 2011 10:44:13 +0100 Subject: Fix a method for crash. --- main.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/main.py b/main.py index 4b559bc..2a8733e 100755 --- a/main.py +++ b/main.py @@ -168,14 +168,15 @@ def process_whisper(nick, msg, mapserv): mapserv.sendall(whisper(nick, "!info - Displays basic information about your account.")) elif broken_string[1] == '!getback': mapserv.sendall(whisper(nick, "!getback - Allows you to retrieve an item that has expired or you no longer wish to sell.")) - elif int(user.get('accesslevel')) == 20 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': - mapserv.sendall(whisper(nick, "!adduser - 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 - Sets the number of slots available to a given user.")) - elif int(user.get('accesslevel')) == 20 and broken_string[1] == '!setaccess': - mapserv.sendall(whisper(nick, "!setaccess - Sets access level for the player: -1 is blocked, 5 is seller and 20 is admin" )) + elif user != -10: + if int(user.get('accesslevel')) == 20 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': + mapserv.sendall(whisper(nick, "!adduser - 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 - Sets the number of slots available to a given user.")) + elif int(user.get('accesslevel')) == 20 and broken_string[1] == '!setaccess': + mapserv.sendall(whisper(nick, "!setaccess - Sets access level for the player: -1 is blocked, 5 is seller and 20 is admin" )) elif msg == "!money": # Trades any money earned through item sales. if user == -10: -- cgit v1.2.3-70-g09d2