package bot

import (
	"strings"

	"github.com/arachnist/gorepost/irc"
)

func ping(output chan irc.Message, msg irc.Message) {
	if strings.Split(msg.Trailing, " ")[0] != ":ping" {
		return
	}

	output <- irc.Message{
		Command:  "PRIVMSG",
		Params:   []string{msg.Prefix.Name},
		Trailing: "pingity pong",
	}
}

func init() {
	AddCallback("PRIVMSG", "ping", ping)
}

package bot

import (
	"strings"

	"github.com/arachnist/gorepost/irc"
)

func ping(output chan irc.Message, msg irc.Message) {
	if strings.Split(msg.Trailing, " ")[0] != ":ping" {
		return
	}

	output <- irc.Message{
		Command:  "PRIVMSG",
		Params:   []string{msg.Prefix.Name},
		Trailing: "pingity pong",
	}
}

func init() {
	AddCallback("PRIVMSG", "msgping", ping)
}

Use a different identifier for user :ping command
Use a different identifier for user :ping command
