IrcAdmin: option for sending privmsgs on connect
nickserv/hostserv stuff are the obvious uses for this. i guess you could have some sort of "hi i connected" type thing to the admin if you wanted
This commit is contained in:
parent
f54e209c2f
commit
b51b8b521d
|
@ -14,6 +14,7 @@ dbname = dr_botzo
|
|||
|
||||
[IrcAdmin]
|
||||
autojoin = #bss
|
||||
automsg = nickserv identify foo
|
||||
|
||||
[Karma]
|
||||
meta.pubmsg_needs_bot_prefix = false
|
||||
|
|
|
@ -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(',')
|
||||
|
|
Loading…
Reference in New Issue