Skip to content
This repository was archived by the owner on Oct 27, 2020. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions sopel_modules/rat_board.py
Original file line number Diff line number Diff line change
Expand Up @@ -944,11 +944,11 @@ def cmd_list(bot, trigger, *remainder):
offset += 1
tmpStr = ''.join(tmp)
plats = tmpStr.split(' ')

for x in plats:
if x not in ['pc', 'ps', 'xb', '', '-']:
raise UsageError()

showpc = 'pc' in plats
showps = 'ps' in plats
showxb = 'xb' in plats
Expand Down Expand Up @@ -1556,6 +1556,12 @@ def ratmama_parse(bot, trigger, db):
if not case.system:
case.system = fields["system"]
# using lower() as systems may be saved in different capitalisation than the client entered it

if not case.system or not case.platform or not case.client:
bot.say("Caution - above signal rejected as strictly invalid."
" Dispatch: please inject manually.")
return # rescue is strictly invalid, bail out

if case.system.lower() != fields["system"].lower():
bot.say("Caution - Reported and autodetected System do not match! Dispatch, check it is set to the correct one! (" + case.system + " vs " + fields["system"] + ")")
case.codeRed = (fields["o2"] != "OK")
Expand Down