parse_moin_bye(): be silent for given users
This commit is contained in:
@@ -46,6 +46,9 @@ config = {
|
|||||||
# the "dice" feature will use more efficient random data (0) for given users
|
# the "dice" feature will use more efficient random data (0) for given users
|
||||||
'enhanced-random-user': ('FIXME', 'FIXME'),
|
'enhanced-random-user': ('FIXME', 'FIXME'),
|
||||||
|
|
||||||
|
# the "moin" feature will be "disabled" for given users
|
||||||
|
'moin-modified-user': (),
|
||||||
|
|
||||||
'tea_steep_time': (3*60 + 40),
|
'tea_steep_time': (3*60 + 40),
|
||||||
|
|
||||||
'image_preview': True
|
'image_preview': True
|
||||||
|
|||||||
10
plugins.py
10
plugins.py
@@ -142,6 +142,16 @@ def parse_moin_bye(**args):
|
|||||||
|
|
||||||
for w in words:
|
for w in words:
|
||||||
if d.lower() == w.lower():
|
if d.lower() == w.lower():
|
||||||
|
if args['reply_user'] in conf('moin-modified-user'):
|
||||||
|
logger('plugin', 'being "quiet" for %s' % w)
|
||||||
|
return {
|
||||||
|
'msg': '/me %s' % random.choice([
|
||||||
|
"doesn't say anything at all",
|
||||||
|
'whistles uninterested',
|
||||||
|
'just ignores this incident'
|
||||||
|
])
|
||||||
|
}
|
||||||
|
|
||||||
logger('plugin', 'sent %s reply for %s' % (
|
logger('plugin', 'sent %s reply for %s' % (
|
||||||
'moin' if direction is moin else 'bye', w
|
'moin' if direction is moin else 'bye', w
|
||||||
))
|
))
|
||||||
|
|||||||
Reference in New Issue
Block a user