diff --git a/config.py b/config.py index e7fad5ee..779eb51c 100644 --- a/config.py +++ b/config.py @@ -75,6 +75,10 @@ IGNORE_USERNAMES = os.environ.get("IGNORE_USERNAMES", 'co-robo coala-bot').split() +RESP_ONLY_REQ_USERS = False + +REQUIRED_USERS = [] + DIVERT_TO_PRIVATE = ('help', ) ROOMS_TO_JOIN = ( diff --git a/utils/filters.py b/utils/filters.py index 9b3c14a7..ca5e1202 100644 --- a/utils/filters.py +++ b/utils/filters.py @@ -23,7 +23,10 @@ def filters(self, msg, cmd, args, dry_run): return msg, cmd, args @cmdfilter - def filter_ignored_users(self, msg, cmd, args, dry_run): + def filter_users(self, msg, cmd, args, dry_run): if msg.frm.nick in self.bot_config.IGNORE_USERNAMES: return None, None, None + if msg.frm.nick not in self.bot_config.REQUIRED_USERS \ + and self.bot_config.RESP_ONLY_REQ_USER: + return None, None, None return msg, cmd, args