summaryrefslogtreecommitdiff
path: root/main.py
diff options
context:
space:
mode:
Diffstat (limited to 'main.py')
-rwxr-xr-xmain.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/main.py b/main.py
index 4fb53b7..602afeb 100755
--- a/main.py
+++ b/main.py
@@ -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: