Page 1 of 1

[FIXED] IRC bot gets stick /nick'ing

Posted: June 1st, 2012, 8:14 am
by Jonty800
I found a rare bug in IRC if your bot nick was the maximum length of characters that IRC will accept and another bot of the same name already exists.

This happens forever:

09:12:14 > IRC: Connecting to irc.esper.net:6667 as ssssssssssssssssssssssssssssssss
09:12:19 > IRC: Error: Nickname "ssssssssssssssssssssssssssssssss" is already in use. Trying "ssssssssssssssssssssssssssssssss_"
09:12:19 > IRC: Error: Nickname "ssssssssssssssssssssssssssssssss_" is already in use. Trying "ssssssssssssssssssssssssssssssss__"
09:12:19 > IRC: Error: Nickname "ssssssssssssssssssssssssssssssss__" is already in use. Trying "ssssssssssssssssssssssssssssssss___"
09:12:20 > IRC: Error: Nickname "ssssssssssssssssssssssssssssssss___" is already in use. Trying "ssssssssssssssssssssssssssssssss____"
09:12:21 > IRC: Error: Nickname "ssssssssssssssssssssssssssssssss____" is already in use. Trying "ssssssssssssssssssssssssssssssss_____"
09:12:22 > IRC: Error: Nickname "ssssssssssssssssssssssssssssssss_____" is already in use. Trying "ssssssssssssssssssssssssssssssss______"
09:12:22 > IRC: Error: Nickname "ssssssssssssssssssssssssssssssss______" is already in use. Trying "ssssssssssssssssssssssssssssssss_______"
09:12:23 > IRC: Error: Nickname "ssssssssssssssssssssssssssssssss_______" is already in use. Trying "ssssssssssssssssssssssssssssssss________"
09:12:24 > IRC: Error: Nickname "ssssssssssssssssssssssssssssssss________" is already in use. Trying "ssssssssssssssssssssssssssssssss_________"
09:12:25 > IRC: Error: Nickname "ssssssssssssssssssssssssssssssss_________" is already in use. Trying "ssssssssssssssssssssssssssssssss__________"
09:12:25 > IRC: Error: Nickname "ssssssssssssssssssssssssssssssss__________" is already in use. Trying "ssssssssssssssssssssssssssssssss___________"

Re: Rare IRC Bug

Posted: June 2nd, 2012, 9:26 am
by fragmer
I haven't thought of that. I'll see what I can do...

Re: Rare IRC Bug

Posted: June 4th, 2012, 4:32 pm
by Jonty800
My thought was to replace the last Character in the name with '_', thus alienating the name slightly.

Edit: Yet again, same would happen if 'LongNam_' existed.

Re: Rare IRC Bug

Posted: October 10th, 2012, 3:33 am
by OfficerFlake
perhaps try the "_" method up to 3 times. after that, generate a random nickname.

Re: Rare IRC Bug

Posted: October 10th, 2012, 1:01 pm
by fragmer
Oh, I forgot all about this bug. I'll go back to look at it. Thanks for reminding me.

Re: Rare IRC Bug

Posted: October 16th, 2012, 9:22 pm
by fragmer
Fixed internally, coming with 0.637