I've been trying to fix a glitch in an IRC server I use, so I'd like to stop a raw message and replace it with another. Nothing I've attempted has worked. The messages are being properly detected (I have a more complex version w/logging and the logs properly fire on the message), but returning znc.HALT and znc.HALTCORE seem to do nothing.
By all accounts, I would expect this to work (a similar strategy is being used in the block_motd module), but nothing works and the message continues on as if the handler wasn't here (except now the additional message is present)
Ubuntu 14.04
ZNC 1.6.2 - IPv6: yes, SSL: yes, DNS: threads, charset: no
I've been trying to fix a glitch in an IRC server I use, so I'd like to stop a raw message and replace it with another. Nothing I've attempted has worked. The messages are being properly detected (I have a more complex version w/logging and the logs properly fire on the message), but returning znc.HALT and znc.HALTCORE seem to do nothing.
By all accounts, I would expect this to work (a similar strategy is being used in the block_motd module), but nothing works and the message continues on as if the handler wasn't here (except now the additional message is present)
```
import znc
class SlackPong(znc.Module):
description = "Stop Slack's annoying PONG messages"
module_types = [znc.CModInfo.NetworkModule]
def OnRaw(self, line):
if str(line).find("PONG :TIMEOUTCHECK") > -1:
self.PutUser(":irc.tinyspeck.com PONG irc.tinyspeck.com :TIMEOUTCHECK")
return znc.HALT
return znc.CONTINUE
```
##
<!-- github-sync-id:117667502 -->
ZNC hangs on IRC -> ZNC [:wilhelm.freenode.net CAP * LS :account-notify extended-join identify-msg multi-prefix sasl] and doesn't reply anything because of HALT.
This simple module works for me:
``` py
import znc
class pytest(znc.Module):
def OnRaw(self, line):
return znc.HALT
```
ZNC hangs on `IRC -> ZNC [:wilhelm.freenode.net CAP * LS :account-notify extended-join identify-msg multi-prefix sasl]` and doesn't reply anything because of HALT.
<!-- github-comment-id:158636122 -->
That's really strange; if I shrink the module down to that, it works, but if I add the find again, it fails to stop the message.
If I replace the if and add self.PutModule("Found timeout!"), I get that message, but the incorrect PONG still goes through...
That's really strange; if I shrink the module down to that, it works, but if I add the find again, it fails to stop the message.
If I replace the if and add `self.PutModule("Found timeout!")`, I get that message, but the incorrect PONG still goes through...
<!-- github-comment-id:159107579 -->
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Ubuntu 14.04
ZNC 1.6.2 - IPv6: yes, SSL: yes, DNS: threads, charset: no
I've been trying to fix a glitch in an IRC server I use, so I'd like to stop a raw message and replace it with another. Nothing I've attempted has worked. The messages are being properly detected (I have a more complex version w/logging and the logs properly fire on the message), but returning znc.HALT and znc.HALTCORE seem to do nothing.
By all accounts, I would expect this to work (a similar strategy is being used in the block_motd module), but nothing works and the message continues on as if the handler wasn't here (except now the additional message is present)
This simple module works for me:
ZNC hangs on
IRC -> ZNC [:wilhelm.freenode.net CAP * LS :account-notify extended-join identify-msg multi-prefix sasl]and doesn't reply anything because of HALT.That's really strange; if I shrink the module down to that, it works, but if I add the find again, it fails to stop the message.
If I replace the if and add
self.PutModule("Found timeout!"), I get that message, but the incorrect PONG still goes through...May you show
znc -Dwith that PONG?Sorry about the delay, the holidays have been a bit busy...
This is without the module:
This is with the module:
The module is basically the same as before, forgot I included it earlier.
Works for me...
irc.tinyspeck.com doesn't resolve, so I did this:
If you have any more info, reopen