diff options
author | Dipesh Amin <yaypunkrock@gmail.com> | 2011-08-31 23:45:44 +0100 |
---|---|---|
committer | Dipesh Amin <yaypunkrock@gmail.com> | 2011-08-31 23:45:44 +0100 |
commit | c547651e966c30aa564e9a4e5c53c83f11168128 (patch) | |
tree | 89394b471a255e50025fe50bb2720942e11fc05b | |
parent | 8cbc1eadd27e0bcb9f12ded7e1670509ee69fda3 (diff) | |
download | manamarket-c547651e966c30aa564e9a4e5c53c83f11168128.tar.gz manamarket-c547651e966c30aa564e9a4e5c53c83f11168128.tar.bz2 manamarket-c547651e966c30aa564e9a4e5c53c83f11168128.tar.xz manamarket-c547651e966c30aa564e9a4e5c53c83f11168128.zip |
add command !tradestate
-rwxr-xr-x | main.py | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -223,6 +223,20 @@ def process_whisper(nick, msg, mapserv): if not items_found: mapserv.sendall(whisper(nick, "Item not found.")) + elif msg == '!tradestate': + # Admin command - return trade state. + if user == -10: + return + + if int(user.get("accesslevel")) != 20: + mapserv.sendall(whisper(nick, "You don't have the correct permissions.")) + return + + if not trader_state.Trading.test(): + mapserv.sendall(whisper(nick, "I'm busy with a trade.")) + else: + mapserv.sendall(whisper(nick, "I'm free.")) + elif msg == '!listusers': # Admin command - shows a list of all user. if user == -10: |