CTCP commands other than ACTION are designed for client-to-client interaction on
IRC networks. Drop such messages when we receive them.
Also get rid of a "CTCP_ACTION" handler in the handler registration.
This
1) can't do anything (if anything, we wanted the string constant
girc.CTCP_ACTION, which is "ACTION")
2) doesn't do anything in this context, because CTCP handlers are
registered separately:
f47717952b/ctcp.go (L205)
The PRIVMSG handler already listens to all CTCPs.
Thanks to @lexande for the bug report (found on a live instance).
Clear IRC event handlers that we will be registering for the new
connection before registering new handlers. This prevents duplicate
event handlers in the case where we are connecting via a BNC and are
seeing a reconnect. Attempting to clear handlers when none have been set
is a no-op.
Fixes 42wim#1564
Co-authored-by: Andreas Vögele <andreas@andreasvoegele.com>
* Allow substitution of bot's nick in RunCommands
* Tweak description of "{BOTNICK}"
Made the description of "{BOTNICK}" consistent with that of other keywords
Clear all existing IRC event handler registrations before registering
new handlers in case we are connecting via a BNC and are seeing
a reconnect.
Fixes#1564
This allows setting custom values for the IRC username/ident and real
name (gecos) fields at server registration time with gIRC.
Co-authored-by: Wim <wim@42.be>
* irc: add support for stateless bridging via draft/relaymsg
As discussed at https://github.com/42wim/matterbridge/issues/667#issuecomment-634214165
* irc: handle the draft/relaymsg tag in spoofed messages too
* Apply suggestions from code review
Co-authored-by: Wim <wim@42.be>
* Run gofmt on irc.go
* Document relaymsg in matterbridge.toml.sample
Co-authored-by: Wim <wim@42.be>
This makes the handlers run in a seperate go-routine in girc, and makes
sure that girc isn't blocked on executing PONG requests when
matterbridge takes a long time handling the incoming message.
This can happen when another bridge is in a backoff state where the
backoff time exceeds the IRC ping timeout.
By default, gIRC rate limits all outgoing messages.
Since matterbridge already implements message throttling, this is extra layer of throttling is not necessary.
Adds a new key OutMessage under [tengo] table, which specifies the location of the script that
will be invoked on each message being sent to a bridge and can be used to modify the Username
and the Text of that message.
The script will have the following global variables:
read-only:
inAccount, inProtocol, inChannel, inGateway
outAccount, outProtocol, outChannel, outGateway
read-write:
msgText, msgUsername
The script is reloaded on every message, so you can modify the script on the fly.
The default script in https://github.com/42wim/matterbridge/tree/master/internal/tengo/outmessage.tengo
is compiled in and will be executed if no script is specified.
Revert "Fix typo"
This reverts commit dffd67eb31.
Revert "Handle quit message relay better on gateways with one channel on the irc bridge #722"
This reverts commit 240559581a.
Revert "Support quits from irc correctly. Fixes#722 (#724)"
This reverts commit d76a04bd0a.
If IRC connection fails on first connect, bail out.
Wait until after nickserv auth until joining channels (also after reconnects)
Don't do a separate irc timeout, some connections take a while #503
Currently numbers are stripped not just after the color control code (\x03) but also after other formatting such as bold (\x02) and italic (\x1D), which is both unnecessary and leads to missing text from irc. This fixes that by only stripping numbers after the color control code.