5
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2025-02-15 10:29:14 +00:00

19 Commits

Author SHA1 Message Date
patrickxia
0bb521512a
Do not bridge CTCP commands other than ACTION (irc) ()
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).
2024-05-24 00:05:55 +02:00
Bryan Davis
b2df32bc81
Clear existing IRC event handlers before connecting to new ones (irc) ()
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>
2024-05-23 23:55:31 +02:00
Kufat
6d5a3dff22
Allow substitution of bot's nick in RunCommands (irc) ()
* Allow substitution of bot's nick in RunCommands

* Tweak description of "{BOTNICK}"

Made the description of "{BOTNICK}" consistent with that of other keywords
2022-11-27 00:01:10 +01:00
Wim
e775a8a22e
Revert "Clear existing IRC event handlers before connecting new ones ()"
This reverts commit f044b948e257814e8e1f70d4b66821bfd9c2ff06.

Fixes 
2022-05-01 22:28:42 +02:00
Bryan Davis
f044b948e2
Clear existing IRC event handlers before connecting new ones ()
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 
2022-04-07 23:00:17 +02:00
Wim
f0f801402d
Refactor utf-8 conversion (irc) () 2022-03-19 23:14:56 +01:00
Wim
8eba2d3e50
Make handlers run async (irc) ()
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.
2020-12-05 21:41:45 +01:00
Wim
0c19716f44
Join on invite (irc). Fixes () 2020-11-22 22:44:15 +01:00
Wim
b24e1bafa1
Add support for irc to irc notice (irc). Fixes () 2020-11-22 22:21:02 +01:00
Wim
393f9e998b
Update dependencies / vendor () 2020-05-24 00:06:21 +02:00
Wim
f7ec9af9e8
Add extra space before colon in attachments (irc). Fixes () 2020-04-19 16:45:53 +02:00
Wim
2d277a15f5
Add scripting (tengo) support for every outgoing message ()
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.
2019-04-19 18:27:31 +02:00
chotaire
6b47e29583 Add verbose IRC joins/parts (ident@host) ()
New configuration setting: VerboseJoinPart (default is false)
2019-04-18 23:56:05 +02:00
Wim
380c38674c Fix deadlock on reconnect (irc). Closes 2019-04-15 23:28:47 +02:00
Wim
8a875f292e Revert fix for . Closes
Revert "Fix typo"

This reverts commit dffd67eb311580aa2b14e7f5a069cfefdbf3aacc.

Revert "Handle quit message relay better on gateways with one channel on the irc bridge "

This reverts commit 240559581a225ff632c00a52e029b3728c61309e.

Revert "Support quits from irc correctly. Fixes  ()"

This reverts commit d76a04bd0a96772cec5b279aaa1ee45235adc707.
2019-04-06 23:12:48 +02:00
Wim
d76a04bd0a
Support quits from irc correctly. Fixes () 2019-02-17 22:43:04 +01:00
Wim
3123695869
Upgrade to latest girc version (irc) () 2019-02-16 17:24:04 +01:00
Duco van Amstel
8a7efce941 Move golangci-lint configuration to file () 2018-12-05 11:34:34 +01:00
Wim
57fbd3c723
Refactor irc handlers. Fix linting () 2018-11-28 10:58:56 +01:00