fix branch test, clean up mroleplay.

This commit is contained in:
2020-07-17 18:53:55 +02:00
parent ec7511e0df
commit 480c658139
2 changed files with 7 additions and 5 deletions
+4 -2
View File
@@ -18,8 +18,10 @@ func TestHandle(t *testing.T) {
event := irc.NewEvent("test", eventName)
handled := false
irc.AddHandler(func(event *irc.Event, client *irc.Client) {
t.Log("Got:", event.Kind(), event.Verb())
client.AddHandler(func(event *irc.Event, client *irc.Client) {
if !handled {
t.Log("Got:", event.Kind(), event.Verb())
}
if event.Kind() == "test" && event.Verb() == eventName {
handled = true
+3 -3
View File
@@ -52,9 +52,9 @@ func MRoleplay(event *irc.Event, client *irc.Client) {
cuts := ircutil.CutMessage(text, overhead)
for _, cut := range cuts {
npcCommand := "NPCA"
if event.Verb() == "npcc" {
npcCommand = "NPC"
npcCommand := "NPC"
if isAction {
npcCommand = "NPCA"
}
client.SendQueuedf("%s %s %s :%s", npcCommand, channel.Name(), nick, cut)