From 6786b61dc81c69035de598586b2b1e475362d0f7 Mon Sep 17 00:00:00 2001 From: gmemstr Date: Mon, 27 Feb 2017 12:01:09 -0800 Subject: [PATCH] Fixed poor Perry spouting gibberish Slackbot had not been correctly updated for new SQL cache. --- .gitignore | 1 + App.py | 4 ++-- src/Slackbot.py | 6 +++--- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 72364f9..2d48041 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +config.json # Byte-compiled / optimized / DLL files __pycache__/ *.py[cod] diff --git a/App.py b/App.py index 2bec83d..621f8c8 100644 --- a/App.py +++ b/App.py @@ -28,13 +28,13 @@ elif config.Get("enable_webserver") is True: print("Webserver starting up") - # scnp = Process(target=scn.Loop()).start() + scnp = Process(target=scn.Loop()).start() wsp = Process(target=ws.Run()).start() elif config.Get("enable_slackbot") is True: print("Slackbot enabled") - scnp = Process(target=scn.Loop()).start() + # scnp = Process(target=scn.Loop()).start() sbp = Process(target=sb.Loop()).start() else: diff --git a/src/Slackbot.py b/src/Slackbot.py index 778df2a..c0cd9d9 100644 --- a/src/Slackbot.py +++ b/src/Slackbot.py @@ -23,9 +23,9 @@ def BuildMessage(self,data): username = "Platypus" icon = ":desktop_computer:" message = "Some panels may be offline!" - for s in sorted(data): - if data[4] != 1: - message = message + " Panel " + str(s) + for s in data: + if s[4] != 1: + message = message + " " + s[1] + " (" + s[2] + ")" off = off + 1 if off > 1: post = True