コード例 #1
0
ファイル: proto.go プロジェクト: bpiraeus/ircb
// onNickInUse is called whenever we receive a notification that our
// nickname is already in use. We will attempt to re-acquire it by
// identifying with our password. Otherwise we will pick a new name.
func onNickInUse(c *proto.Client, m *proto.Message) {
	if len(config.NickservPassword) > 0 {
		c.Recover(config.Nickname, config.NickservPassword)
		return
	}

	config.SetNickname(config.Nickname + "_")
	c.Nick(config.Nickname, "")
}