respect mixed case commands

This commit is contained in:
Aaron Bieber 2020-04-11 10:01:14 -06:00
parent 15b386237c
commit d206c2d736

View File

@ -4038,6 +4038,7 @@ func (t *Toki) fix(msg string) (string, string) {
// RespondText to hi events // RespondText to hi events
func (t *Toki) RespondText(c *gomatrix.Client, ev *gomatrix.Event, user, post string) { func (t *Toki) RespondText(c *gomatrix.Client, ev *gomatrix.Event, user, post string) {
cmd, w := t.fix(post) cmd, w := t.fix(post)
cmd = strings.ToLower(cmd)
switch cmd { switch cmd {
case "toki": case "toki":
if word, ok := TokiLang[w]; ok { if word, ok := TokiLang[w]; ok {