Skip to content

Commit

Permalink
admin: prevent setting of 'core.owner' setting
Browse files Browse the repository at this point in the history
  • Loading branch information
HumorBaby committed May 6, 2019
1 parent 684c0b4 commit 908e4e0
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions sopel/modules/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,13 @@ def set_config(bot, trigger):
bot.reply("%s.%s = %s" % (section_name, option, value))
return

# 'core.owner` cannot be set by the bot. Any changes to this setting must be
# made manually in the config file.
if section_name == 'core' and option == 'owner':
bot.say('\'core.owner\' cannot be set by the bot. '
'This setting must be changed manually in the configuration file.')
return

# Otherwise, set the value to one given as argument 2.
value = trigger.group(2)[delim:]
if static_sec:
Expand Down

0 comments on commit 908e4e0

Please sign in to comment.