mirror of
https://github.com/cwinfo/matterbridge.git
synced 2025-06-26 01:49:22 +00:00
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
This commit is contained in:
@ -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)
|
||||
}
|
||||
|
Reference in New Issue
Block a user