temporarily disable full bot protection, fix light protection
This commit is contained in:
@@ -67,6 +67,7 @@ def runtimeconf_get(key, default=None):
|
||||
|
||||
@interprocess_locked(runtime_config_store.filename)
|
||||
def runtimeconf_persist():
|
||||
logging.getLogger(__name__).debug(json.dumps(runtime_config_store, indent=2))
|
||||
runtime_config_store.write()
|
||||
|
||||
|
||||
|
||||
@@ -962,6 +962,7 @@ def recognize_bots(**args):
|
||||
if username not in config.runtime_config_store['other_bots']:
|
||||
config.runtime_config_store['other_bots'].append(username)
|
||||
config.runtimeconf_persist()
|
||||
log.info("Adding {} to the list of bots (now {})".format(username, config.runtime_config_store['other_bots']))
|
||||
return {
|
||||
'event': {
|
||||
'time': time.time() + 3,
|
||||
@@ -970,9 +971,9 @@ def recognize_bots(**args):
|
||||
}
|
||||
|
||||
if any([phrase in args['data'] for phrase in unique_standard_phrases]):
|
||||
_add_to_list(args['reply_user'], 'Making notes...')
|
||||
return _add_to_list(args['reply_user'], 'Making notes...')
|
||||
elif 'I\'ll be back' in args['data']:
|
||||
_add_to_list(args['reply_user'], 'Hey there, buddy!')
|
||||
return _add_to_list(args['reply_user'], 'Hey there, buddy!')
|
||||
|
||||
|
||||
@pluginfunction("remove-from-botlist", "remove a user from the botlist", ptypes_COMMAND)
|
||||
|
||||
@@ -158,8 +158,8 @@ class UrlBot(IdleBot):
|
||||
if msg_obj:
|
||||
# TODO: bot modes off/on/auto... this should be active for "on".
|
||||
# message = _prevent_panic(message, msg_obj['from'].bare)
|
||||
if get_bots_present(msg_obj['from'].bare):
|
||||
return
|
||||
# if get_bots_present(msg_obj['from'].bare):
|
||||
# return
|
||||
self.send_message(
|
||||
mto=msg_obj['from'].bare,
|
||||
mbody=message,
|
||||
|
||||
Reference in New Issue
Block a user