Skip to content
This repository has been archived by the owner on Oct 27, 2020. It is now read-only.

Commit

Permalink
Set nickname to cmdr name if nonexistant before creating the case.
Browse files Browse the repository at this point in the history
  • Loading branch information
Marenthyu committed Apr 9, 2017
1 parent d0f008e commit 150602c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions sopel-modules/rat-board.py
Original file line number Diff line number Diff line change
Expand Up @@ -1391,6 +1391,8 @@ def ratmama_parse(bot, trigger, db):
case.platform = "ps"
else:
case.platform = fields["platform"].lower()
if not fields["nick"]:
fields["nick"] = fields["cmdr"]
with bot.memory['ratbot']['board'].change(case):
case.data.update(defaultdata)
case.data.update({
Expand All @@ -1399,8 +1401,7 @@ def ratmama_parse(bot, trigger, db):
"boardIndex": int(case.boardindex)
})

if not fields["nick"]:
fields["nick"] = fields["cmdr"]


save_case_later(bot, case, forceFull=True)
if result.created:
Expand Down

0 comments on commit 150602c

Please sign in to comment.