Prefix nick instead of suffix if the nick is in use and over 8 characters long

This commit is contained in:
tj 2010-08-08 23:10:54 +02:00
parent 2235f8b8ed
commit bcec3b6f11

View File

@ -91,7 +91,11 @@ func (irc *IRCConnection) setupCallbacks() {
})
irc.AddCallback("433", func(e *IRCEvent) {
if len(irc.nick) > 8 {
irc.nick = "_" + irc.nick;
} else {
irc.nick = irc.nick + "_"
}
irc.SendRaw(fmt.Sprintf("NICK %s", irc.nick))
})