fix target chan issues
Signed-off-by: Pratyush Desai <pratyush.desai@liberta.casa>
This commit is contained in:
parent
a321b6584d
commit
8cacf16cb9
@ -61,6 +61,9 @@ SnoParser = conf.registerPlugin('SnoParser')
|
|||||||
#conf.registerNetworkValue(SnoParser, 'targetChannel', ValidChannel,
|
#conf.registerNetworkValue(SnoParser, 'targetChannel', ValidChannel,
|
||||||
# ("", ("""Determines which channel the bot should send snolines""")))
|
# ("", ("""Determines which channel the bot should send snolines""")))
|
||||||
|
|
||||||
|
conf.registerNetworkValue(SnoParser, 'targetChannel',
|
||||||
|
registry.String("", ("""Determines which channel the bot should snolines example: `#snotices`""")))
|
||||||
|
|
||||||
conf.registerGlobalValue(SnoParser, 'AutoVhost',
|
conf.registerGlobalValue(SnoParser, 'AutoVhost',
|
||||||
registry.String('libcasa/user/', ("""Configure the vhost eg. libcasa/user/$account""")))
|
registry.String('libcasa/user/', ("""Configure the vhost eg. libcasa/user/$account""")))
|
||||||
|
|
||||||
|
@ -253,7 +253,7 @@ class SnoParser(callbacks.Plugin):
|
|||||||
(target, text) = msg.args
|
(target, text) = msg.args
|
||||||
|
|
||||||
if target == irc.nick:
|
if target == irc.nick:
|
||||||
# server notices CONNECT, KILL, XLINE, NICK, ACCOUNT
|
# server notices CONNECT, KILL, XLINE, NICK, ACCOUNT, OPER, QUIT,
|
||||||
text = ircutils.stripFormatting(text)
|
text = ircutils.stripFormatting(text)
|
||||||
if 'CONNECT' in text:
|
if 'CONNECT' in text:
|
||||||
connregex = "^-CONNECT- Client connected \[(.+)\] \[u\:~(.+)\] \[h\:(.+)\] \[ip\:(.+)\] \[r\:(.+)\]$"
|
connregex = "^-CONNECT- Client connected \[(.+)\] \[u\:~(.+)\] \[h\:(.+)\] \[ip\:(.+)\] \[r\:(.+)\]$"
|
||||||
@ -344,8 +344,8 @@ class SnoParser(callbacks.Plugin):
|
|||||||
|
|
||||||
# Trigger HS SET
|
# Trigger HS SET
|
||||||
self._setvhost(irc, msg, account)
|
self._setvhost(irc, msg, account)
|
||||||
|
|
||||||
self._sendSnotice(irc, msg, repl)
|
self._sendSnotice(irc, msg, repl)
|
||||||
|
|
||||||
if 'ACCOUNT' in text and 'registered account' in text and 'SAREGISTER' in text:
|
if 'ACCOUNT' in text and 'registered account' in text and 'SAREGISTER' in text:
|
||||||
accregex = "^-ACCOUNT- Operator \[(.*)\] registered account \[(.*)\] with SAREGISTER$"
|
accregex = "^-ACCOUNT- Operator \[(.*)\] registered account \[(.*)\] with SAREGISTER$"
|
||||||
couple = re.match(accregex, text)
|
couple = re.match(accregex, text)
|
||||||
|
Loading…
Reference in New Issue
Block a user