diff options
author | Kufat <kufat@kufat.net> | 2022-11-26 18:01:10 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-27 00:01:10 +0100 |
commit | 6d5a3dff2279f9cc1e9a846419c6cae2fe563e8d (patch) | |
tree | 4975e052caefdd4beb0d05b92a9b9a3520781810 /bridge/irc/handlers.go | |
parent | 3ad5deaff12abdba195824a940ab053ad6630752 (diff) | |
download | matterbridge-msglm-6d5a3dff2279f9cc1e9a846419c6cae2fe563e8d.tar.gz matterbridge-msglm-6d5a3dff2279f9cc1e9a846419c6cae2fe563e8d.tar.bz2 matterbridge-msglm-6d5a3dff2279f9cc1e9a846419c6cae2fe563e8d.zip |
Allow substitution of bot's nick in RunCommands (irc) (#1890)
* Allow substitution of bot's nick in RunCommands
* Tweak description of "{BOTNICK}"
Made the description of "{BOTNICK}" consistent with that of other keywords
Diffstat (limited to 'bridge/irc/handlers.go')
-rw-r--r-- | bridge/irc/handlers.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/bridge/irc/handlers.go b/bridge/irc/handlers.go index 987df2c5..74db7685 100644 --- a/bridge/irc/handlers.go +++ b/bridge/irc/handlers.go @@ -243,6 +243,7 @@ func (b *Birc) handlePrivMsg(client *girc.Client, event girc.Event) { func (b *Birc) handleRunCommands() { for _, cmd := range b.GetStringSlice("RunCommands") { + cmd = strings.ReplaceAll(cmd, "{BOTNICK}", b.Nick) if err := b.i.Cmd.SendRaw(cmd); err != nil { b.Log.Errorf("RunCommands %s failed: %s", cmd, err) } |