fix malformed PRIVMSG causing crashes in andchat

--HG--
branch : nmdc-ircfrontend
This commit is contained in:
. 2016-05-07 17:51:45 +12:00
parent 98e8ef43ba
commit 05cb916ae5

View File

@ -540,7 +540,7 @@ func (s *Server) reply(code replyCode, args ...string) {
s.writeClient(fmt.Sprintf(":%s KILL %s A %s", args[0], s.upstreamLauncher.Self.Nick, args[1])) s.writeClient(fmt.Sprintf(":%s KILL %s A %s", args[0], s.upstreamLauncher.Self.Nick, args[1]))
case rplMsg: case rplMsg:
for _, itm := range strings.Split(args[2], "\n") { for _, itm := range strings.Split(args[2], "\n") {
s.writeClient(fmt.Sprintf(":%s PRIVMSG %s %s", args[0], args[1], itm)) s.writeClient(fmt.Sprintf(":%s PRIVMSG %s :%s", args[0], args[1], itm))
} }
case rplList: case rplList:
s.writeClient(fmt.Sprintf(":%s 322 %s %s", s.name, s.upstreamLauncher.Self.Nick, args[0])) s.writeClient(fmt.Sprintf(":%s 322 %s %s", s.name, s.upstreamLauncher.Self.Nick, args[0]))