Browse Source

allow the bot to ignore all commands sent to @#channel or +#channel (botconfig.py updated!)

master
jcao219 12 years ago
parent
commit
d407f9bbfb
  1. 2
      botconfig.py.example
  2. 3
      modules/common.py

2
botconfig.py.example

@ -6,8 +6,10 @@ USERNAME = "" # for authentication, can be left blank if same as NICK @@ -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)

3
modules/common.py

@ -12,6 +12,9 @@ def on_privmsg(cli, rawnick, chan, msg): @@ -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():

Loading…
Cancel
Save