mirror of
https://github.com/gissleh/irc.git
synced 2026-09-29 00:05:34 +00:00
fix branch test, clean up mroleplay.
This commit is contained in:
+4
-2
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user