blob: 9da4ee945fec71c0375a8ff96c7b112a253a606d (
plain) (
tree)
|
|
package main
func init() {
commandHandlers["PING"] = handleClientPing
}
func handleClientPing(msg RMsg, client *Client) error {
if len(msg.Params) < 1 {
return client.Send(MakeMsg(self, ERR_NEEDMOREPARAMS, "PING", "Not enough parameters"))
}
return client.Send(MakeMsg(self, "PONG", self.Name, msg.Params[0]))
}
|