Closed Villawhatever closed 3 years ago
Even with strings.ToLower
, !Ruling
is still processing incorrectly:
Uppercase still failing:
DBUG[06-03|07:30:26] Dispatching message From=Volo To=#frybottest Content="!Ruling 1 abbot of keral keep"
DBUG[06-03|07:30:26] Processing: Command="!Ruling 1 abbot of keral keep"
DBUG[06-03|07:30:26] Dispatching index=0
DBUG[06-03|07:30:26] Receiving index=0
DBUG[06-03|07:30:26] In handleCommand Message="ruling 1 abbot of keral keep"
DBUG[06-03|07:30:26] Done tokenising Tokens="[ruling 1 abbot of keral keep]"
DBUG[06-03|07:30:26] Metadata query
DBUG[06-03|07:30:26] In a Ruling Query - Valid command detected Command=ruling Card Name="abbot of keral keep" Ruling No.=0
Lowercase is fine:
DBUG[06-03|07:30:37] Incoming id=9605d78269bfb434 host=irc.libera.chat:6667 nick=Fryatest raw=":Volo!~Volo@c-73-59-128-136.hsd1.la.comcast.net PRIVMSG #frybottest :!ruling 1 abbot of keral keep" msg.To=#frybottest msg.From=Volo msg.Params="[#frybottest !ruling 1 abbot of keral keep]" msg.Trailing="!ruling 1 abbot of keral keep"
DBUG[06-03|07:30:37] Dispatching message From=Volo To=#frybottest Content="!ruling 1 abbot of keral keep"
DBUG[06-03|07:30:37] Processing: Command="!ruling 1 abbot of keral keep"
DBUG[06-03|07:30:37] Dispatching index=0
DBUG[06-03|07:30:37] Receiving index=0
DBUG[06-03|07:30:37] In handleCommand Message="ruling 1 abbot of keral keep"
DBUG[06-03|07:30:37] Done tokenising Tokens="[ruling 1 abbot of keral keep]"
DBUG[06-03|07:30:37] Metadata query
DBUG[06-03|07:30:37] In a Ruling Query - Valid command detected Command=ruling Card Name="abbot of keral keep" Ruling No.=1
For some reason it's failing to parse the ruling number.
Technically this shouldn't work - these are commands and commands are more often than not case sensititive. But its a relatively easy fix so why not
This works fine:
But this does not:
And this was processed as a ruling query:
Far as I can tell, we can just change https://github.com/Fryyyyy/Fryatog/blob/44f3eb812d88dfbda9c7d444a9709922775136b8/main.go#L328 to
message := strings.ToLower(params.message)
. The only thing that seems to be incorrect with that is!wc [username]
gives the name in lowercase, which is so far into WhoCaresVille.