mirror of
https://github.com/irssi/irssi.git
synced 2026-08-16 15:12:11 +02:00
Don't try to set alternate_nick to any default value, it's not very useful
and it didn't work properly if nick was 9 chars with last char being '_' (not very likely though :). Also handle properly the situation where nick and alternate_nick are the same. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2311 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
66e8aa2c74
commit
e6bf76ed11
2 changed files with 3 additions and 15 deletions
|
|
@ -255,8 +255,9 @@ static void event_nick_in_use(IRC_SERVER_REC *server, const char *data)
|
|||
}
|
||||
|
||||
/* nick already in use - need to change it .. */
|
||||
if (strcmp(server->nick, server->connrec->nick) == 0 &&
|
||||
server->connrec->alternate_nick != NULL) {
|
||||
if (g_strcasecmp(server->nick, server->connrec->nick) == 0 &&
|
||||
server->connrec->alternate_nick != NULL &&
|
||||
g_strcasecmp(server->connrec->alternate_nick, server->nick) != 0) {
|
||||
/* first try, so try the alternative nick.. */
|
||||
g_free(server->nick);
|
||||
server->nick = g_strdup(server->connrec->alternate_nick);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue