diff --git a/botconfig.py.example b/botconfig.py.example index f06bbbd..81fb2a8 100644 --- a/botconfig.py.example +++ b/botconfig.py.example @@ -6,8 +6,10 @@ USERNAME = "" # for authentication, can be left blank if same as NICK NICK = "mywolfbot" CMD_CHAR = "!" CHANGING_HOST_QUIT_MESSAGE = "Changing host" + JOIN_AFTER_CLOAKED = True # Set to false if the bot does not have a cloak DISABLE_DEBUG_MODE = False # Entirely disable debug mode +IGNORE_HIDDEN_COMMANDS = True # Ignore commands sent to @#channel or +#channel OWNERS = ("unaffiliated/wolfbot_admin1",) # the comma is required at the end if there is one owner ADMINS = ("unaffiliated/wolfbot_admin2", "unaffiliated/wolfbot_admin3") # glob syntax supported (wildcards) diff --git a/modules/common.py b/modules/common.py index 018fab9..a371bea 100644 --- a/modules/common.py +++ b/modules/common.py @@ -12,6 +12,9 @@ def on_privmsg(cli, rawnick, chan, msg): currmod = ld.MODULES[ld.CURRENT_MODULE] else: currmod = None + + if botconfig.IGNORE_HIDDEN_COMMANDS and (chan.startswith("@#") or chan.startswith("+#")): + return if chan != botconfig.NICK: #not a PM if currmod and "" in currmod.COMMANDS.keys():