Do not prepend unnecessary ':' to person-to-person PRIVMSGs
This commit is contained in:
parent
564374f324
commit
60bd9cec0b
@ -377,7 +377,7 @@ func (daemon *Daemon) Processor(events <-chan ClientEvent) {
|
||||
target := strings.ToLower(cols[0])
|
||||
for c := range daemon.clients {
|
||||
if c.nickname == target {
|
||||
msg = fmt.Sprintf(":%s %s %s :%s", client, command, c.nickname, cols[1])
|
||||
msg = fmt.Sprintf(":%s %s %s %s", client, command, c.nickname, cols[1])
|
||||
c.Msg(msg)
|
||||
break
|
||||
}
|
||||
|
@ -83,7 +83,7 @@ func TestTwoUsers(t *testing.T) {
|
||||
<-conn1.outbound
|
||||
<-conn2.outbound
|
||||
}
|
||||
conn1.inbound <- "PRIVMSG nick2 Hello"
|
||||
conn1.inbound <- "PRIVMSG nick2 :Hello"
|
||||
conn1.inbound <- "PRIVMSG #foo :world"
|
||||
conn1.inbound <- "NOTICE #foo :world"
|
||||
if r := <-conn2.outbound; r != ":nick1!foo1@someclient PRIVMSG nick2 :Hello\r\n" {
|
||||
|
Loading…
Reference in New Issue
Block a user