summaryrefslogtreecommitdiffstats
path: root/wat/bot.go
diff options
context:
space:
mode:
authorPratyush Desai2024-10-02 21:44:49 +0200
committerPratyush Desai2024-10-02 21:44:49 +0200
commit394d6ca2fa34f924b1790ad66da42cf374829315 (patch)
treeec71a9d8bff6b0559bba44422bba7160fcc277cb /wat/bot.go
parenta5cc5e031754db83816e59849de6cb75ff92f9ae (diff)
parentd99a0d84bf3f473a5b78cf8b16b72c7ca927fdb0 (diff)
downloadwatbot-394d6ca2fa34f924b1790ad66da42cf374829315.tar.gz
watbot-394d6ca2fa34f924b1790ad66da42cf374829315.tar.bz2
watbot-394d6ca2fa34f924b1790ad66da42cf374829315.zip
Merge pull request 'Strip formatting codes' (#19) from format into master
Reviewed-on: https://git.com.de/LibertaCasa/watbot/pulls/19
Diffstat (limited to 'wat/bot.go')
-rw-r--r--wat/bot.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/wat/bot.go b/wat/bot.go
index 41c030f..ffa6d8b 100644
--- a/wat/bot.go
+++ b/wat/bot.go
@@ -6,6 +6,7 @@ import (
"strings"
"github.com/go-irc/irc"
+ "github.com/ergochat/irc-go/ircfmt"
)
type WatBot struct {
@@ -104,7 +105,7 @@ func (w *WatBot) Msg(m *irc.Message) {
}
// fieldsfunc allows you to obtain rune separated fields/args
- args := strings.FieldsFunc(m.Params[1], func(c rune) bool { return c == ' ' })
+ args := strings.FieldsFunc(ircfmt.Strip(m.Params[1]), func(c rune) bool { return c == ' ' })
if len(args) == 0 {
return