diff --git a/dr.botzo.cfg.example b/dr.botzo.cfg.example index d9ade37..8d5c024 100644 --- a/dr.botzo.cfg.example +++ b/dr.botzo.cfg.example @@ -14,6 +14,7 @@ dbname = dr_botzo [IrcAdmin] autojoin = #bss +automsg = nickserv identify foo [Karma] meta.pubmsg_needs_bot_prefix = false diff --git a/modules/IrcAdmin.py b/modules/IrcAdmin.py index 459b746..a91425c 100644 --- a/modules/IrcAdmin.py +++ b/modules/IrcAdmin.py @@ -46,6 +46,14 @@ class IrcAdmin(Module): connection.mode(nick, usermode) except NoOptionError: pass + # run automsg commands + try: + automsgs = self.config.get(self.__class__.__name__, 'automsg').split(',') + for command in automsgs: + connection.privmsg(command.split(' ')[0], + ' '.join(command.split(' ')[1:])) + except NoOptionError: pass + # join the specified channels try: autojoins = self.config.get(self.__class__.__name__, 'autojoin').split(',')