diff options
Diffstat (limited to 'cmd_ping.go')
-rw-r--r-- | cmd_ping.go | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/cmd_ping.go b/cmd_ping.go index 4ad07c5..c5442b5 100644 --- a/cmd_ping.go +++ b/cmd_ping.go @@ -4,10 +4,11 @@ func init() { commandHandlers["PING"] = handleClientPing } -func handleClientPing(msg RMsg, client *Client) (error) { +func handleClientPing(msg RMsg, client *Client) bool { if len(msg.Params) < 1 { - client.Send(SMsg{Command: ERR_NEEDMOREPARAMS, Params: []string{"PING", "Not enough parameters"}}) + client.Send(MakeMsg(self, ERR_NEEDMOREPARAMS, "PING", "Not enough parameters")) + return true } - client.Send(SMsg{Command: "PONG", Params: []string{msg.Params[0]}}) - return nil + client.Send(MakeMsg(self, "PONG", msg.Params[0])) + return true } |