Skip to content
This repository has been archived by the owner on Mar 14, 2023. It is now read-only.

[SECURITY] Actually fix #3

Merged
merged 4 commits into from
Oct 12, 2020
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

setup(
name='sopel_plugins.channelmgnt',
version='1.0.2',
version='1.0.3',
description='Channelmgnt plugin for Sopel',
long_description=readme,
long_description_content_type='text/markdown', # This is important!
Expand Down
6 changes: 4 additions & 2 deletions sopel_channelmgnt/channelmgnt/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,15 @@ def makemodechange(bot, trigger, mode, isusermode=False, isbqmode=False, selfsaf
bot.say('Attempting to OP...')
bot.say('op ' + trigger.sender, 'ChanServ')
time.sleep(1)
if isusermode and not trigger.group(2):
if isusermode and not trigger.group(2) and selfsafe:
bot.write(['MODE', trigger.sender, mode, trigger.nick])
elif isusermode and not trigger.group(2) and trigger.account in chanops:
bot.write(['MODE', trigger.sender, mode, trigger.nick])
elif isusermode and trigger.account in chanops:
bot.write(['MODE', trigger.sender, mode, trigger.group(2)])
elif isbqmode and trigger.account in chanops:
bot.write(['MODE', trigger.sender, mode, parse_host_mask(trigger.group().split())])
elif trigger.account in chanops and selfsafe:
elif trigger.account in chanops:
bot.write(['MODE', trigger.sender, mode])
else:
bot.reply('Access Denied. If in error, please contact the channel founder.')
Expand Down