diff --git a/modules/isup.py b/modules/isup.py index 73b110a..bcd84a9 100755 --- a/modules/isup.py +++ b/modules/isup.py @@ -27,18 +27,23 @@ def isup(bot, trigger): return bot.msg("Missing or invalid schema. Check the URL.") except requests.exceptions.ConnectionError: - return bot.msg("Connection error. Are you sure this is a real website?") + return bot.msg("\x0304Connection error\x03. Are you sure this is " + \ + "a real website?") except requests.exceptions.InvalidURL: return bot.msg("Invalid URL.") + except requests.exceptions.ReadTimeout: + return bot.msg("\x0307" + url + "\x03 looks \x0304down\x03 from " + \ + "here (\x0304Timed out [10s]\x03)") + except Exception as e: print(e) - return bot.msg("Listen buddy. I don't know what you're doing, but \ - you're not doing it right.") + return bot.msg("Listen buddy. I don't know what you're doing, but " + \ + "you're not doing it right.") try: res.raise_for_status() - return bot.msg(url + " appears to be working from here.") + return bot.msg("\x0307" + url + "\x03 looks \x0303up\x03 from here.") except requests.exceptions.HTTPError: - return bot.msg(url + " looks down from here.") + return bot.msg("\x0307" + url + "\x03 looks \x0304down\x03 from here.") diff --git a/modules/watcher.py b/modules/watcher.py index f7a4e6a..ae3acf2 100755 --- a/modules/watcher.py +++ b/modules/watcher.py @@ -106,7 +106,7 @@ def watch(bot, trigger): bot.memory["watcher"][url] = t bot.db.execute("INSERT INTO watcher(api_url, name, last_post, time_since)" - " VALUES(?,?,?,?,?)", (api_url, name, last_post, time_since)) + " VALUES(?,?,?,?)", (api_url, name, last_post, time_since)) bot.msg("[\x0304Watcher\x03] Watching thread: \x0307" + url)