aboutsummaryrefslogblamecommitdiff
path: root/cmd_ping.go
blob: 951233e9623170688a93485988eaee09d0b6e6ba (plain) (tree)
1
2
3
4
5
6
7
8
9


             
                                                  

 
                                                       
                                
                                                                                                      
         
                                                                           
 
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]))
}