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]
|
[IrcAdmin]
|
||||||
autojoin = #bss
|
autojoin = #bss
|
||||||
|
automsg = nickserv identify foo
|
||||||
|
|
||||||
[Karma]
|
[Karma]
|
||||||
meta.pubmsg_needs_bot_prefix = false
|
meta.pubmsg_needs_bot_prefix = false
|
||||||
|
|
|
@ -46,6 +46,14 @@ class IrcAdmin(Module):
|
||||||
connection.mode(nick, usermode)
|
connection.mode(nick, usermode)
|
||||||
except NoOptionError: pass
|
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
|
# join the specified channels
|
||||||
try:
|
try:
|
||||||
autojoins = self.config.get(self.__class__.__name__, 'autojoin').split(',')
|
autojoins = self.config.get(self.__class__.__name__, 'autojoin').split(',')
|
||||||
|
|
Loading…
Reference in New Issue