diff --git a/handle_test.go b/handle_test.go index a3c8af9..077752f 100644 --- a/handle_test.go +++ b/handle_test.go @@ -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 diff --git a/handlers/mroleplay.go b/handlers/mroleplay.go index ac9ab23..e2ba313 100644 --- a/handlers/mroleplay.go +++ b/handlers/mroleplay.go @@ -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)