diff options
| author | Pratyush Desai | 2021-10-16 11:43:34 +0530 |
|---|---|---|
| committer | Pratyush Desai | 2021-10-16 11:43:34 +0530 |
| commit | 8cacf16cb94920033b8d0c491eb7d931d552e98c (patch) | |
| tree | 676e70928f95fb112981d46b2c74921bb44d6700 | |
| parent | a321b6584d6dc11ed800cbceef3e68cbc63aac9a (diff) | |
| download | snoparser-8cacf16cb94920033b8d0c491eb7d931d552e98c.tar.gz snoparser-8cacf16cb94920033b8d0c491eb7d931d552e98c.tar.bz2 snoparser-8cacf16cb94920033b8d0c491eb7d931d552e98c.zip | |
fix target chan issues
Signed-off-by: Pratyush Desai <pratyush.desai@liberta.casa>
| -rw-r--r-- | config.py | 3 | ||||
| -rw-r--r-- | plugin.py | 4 |
2 files changed, 5 insertions, 2 deletions
@@ -61,6 +61,9 @@ SnoParser = conf.registerPlugin('SnoParser') #conf.registerNetworkValue(SnoParser, 'targetChannel', ValidChannel, # ("", ("""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', registry.String('libcasa/user/', ("""Configure the vhost eg. libcasa/user/$account"""))) @@ -253,7 +253,7 @@ class SnoParser(callbacks.Plugin): (target, text) = msg.args if target == irc.nick: - # server notices CONNECT, KILL, XLINE, NICK, ACCOUNT + # server notices CONNECT, KILL, XLINE, NICK, ACCOUNT, OPER, QUIT, text = ircutils.stripFormatting(text) if 'CONNECT' in text: connregex = "^-CONNECT- Client connected \[(.+)\] \[u\:~(.+)\] \[h\:(.+)\] \[ip\:(.+)\] \[r\:(.+)\]$" @@ -344,8 +344,8 @@ class SnoParser(callbacks.Plugin): # Trigger HS SET self._setvhost(irc, msg, account) - self._sendSnotice(irc, msg, repl) + if 'ACCOUNT' in text and 'registered account' in text and 'SAREGISTER' in text: accregex = "^-ACCOUNT- Operator \[(.*)\] registered account \[(.*)\] with SAREGISTER$" couple = re.match(accregex, text) |
