Support templating in automessages

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2021-05-06 15:19:24 +02:00
parent 64daf6ef80
commit 5d44822a27
Signed by: luzifer
GPG key ID: 0066F03ED215AD7D

View file

@ -113,7 +113,11 @@ func (a *autoMessage) Send(c *irc.Client) error {
a.lock.Lock()
defer a.lock.Unlock()
msg := a.Message
msg, err := formatMessage(a.Message, nil, nil, nil)
if err != nil {
return errors.Wrap(err, "preparing message")
}
if a.UseAction {
msg = fmt.Sprintf("\001ACTION %s\001", msg)
}