Skip to content

Commit

Permalink
Ignore skips when checking # of commands
Browse files Browse the repository at this point in the history
  • Loading branch information
csnardi committed Sep 2, 2015
1 parent 80dcf17 commit 09c0198
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion chatcommunicate.py
Expand Up @@ -67,7 +67,11 @@ def watcher(ev, wrap2):
ev.message.reply("I don't have any messages posted after the latest reboot.")
return
commands = message_parts[1:]
if len(commands) > 5:
length_without_skips = 0
for command in commands:
if command == "-":
length_without_skips += 1
if length_without_skips > 5:
ev.message.reply("You can only execute five commands at one time.")
return
if len(commands) > len(GlobalVars.latest_smokedetector_messages[ev_room]):
Expand Down

0 comments on commit 09c0198

Please sign in to comment.