Skip to content

Commit

Permalink
message record now persists between reboots
Browse files Browse the repository at this point in the history
  • Loading branch information
normalhuman committed Jul 21, 2016
1 parent f9a3a82 commit bf97d85
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions chatcommunicate.py
Expand Up @@ -103,10 +103,10 @@ def watcher(ev, wrap2):
latest_smokedetector_messages = GlobalVars.latest_smokedetector_messages[ev_room]
commands = message_parts[1:]
if len(latest_smokedetector_messages) == 0:
ev.message.reply("I don't have any messages posted after the latest reboot.")
ev.message.reply("I don't have a record of any messages posted.")
return
if len(commands) > len(latest_smokedetector_messages):
ev.message.reply("I've only posted {} messages since the latest reboot; that's not enough to execute all commands. No commands were executed.".format(len(latest_smokedetector_messages)))
ev.message.reply("I only have a record of {} of my messages; that's not enough to execute all commands. No commands were executed.".format(len(latest_smokedetector_messages)))
return
for i in xrange(0, len(commands)):
shortcut_messages.append(u":{message} {command_name}".format(message=latest_smokedetector_messages[-(i + 1)], command_name=commands[i]))
Expand Down

0 comments on commit bf97d85

Please sign in to comment.