add simple plugin disable config option
This commit is contained in:
parent
2a11825779
commit
62cc0490d1
|
@ -1,3 +1,5 @@
|
|||
import re
|
||||
|
||||
from util import hook
|
||||
|
||||
|
||||
|
@ -18,4 +20,9 @@ def sieve_suite(bot, input, func, kind, args):
|
|||
if input.chan.lower() in denied_channels:
|
||||
return None
|
||||
|
||||
fn = re.match(r'^plugins.(.+).py$', func._filename)
|
||||
disabled = bot.config.get('disabled_plugins', {})
|
||||
if fn and fn.group(1).lower() in disabled:
|
||||
return None
|
||||
|
||||
return input
|
||||
|
|
|
@ -70,7 +70,7 @@ def get_nicks_by_tag(db, chan, subject):
|
|||
" and chan=?"
|
||||
" order by lower(nick)", (subject, chan)).fetchall()
|
||||
|
||||
nicks = [munge(x[0], 3) for x in nicks]
|
||||
nicks = [munge(x[0], 1) for x in nicks]
|
||||
if not nicks:
|
||||
return 'tag not found'
|
||||
return 'nicks tagged "%s": ' % subject + ', '.join(nicks)
|
||||
|
|
Loading…
Reference in New Issue