Navigation Menu

Skip to content

Commit

Permalink
Core(fix): correct nick generation
Browse files Browse the repository at this point in the history
  • Loading branch information
SilverRainZ committed Nov 13, 2019
1 parent 7b7b930 commit 39ced08
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/app_irc_event.c
Expand Up @@ -1378,13 +1378,13 @@ static void irc_event_numeric(SircSession *sirc, int event,
if (!srv->registered){
char *new_nick;

if (strlen(nick) - strlen(srv->user->nick) >= 2) {
if (strlen(nick) - strlen(srv->cfg->user->nick) <= 2) {
// Try new nick with a trailing underline('_')
new_nick = g_strdup_printf("%s_", nick);
} else {
// Rewind to original nickname when there are too much
// trailing underlines
new_nick = g_strdup(srv->user->nick);
new_nick = g_strdup(srv->cfg->user->nick);
}

// FIXME: ircd-seven will truncate the nick without
Expand Down

0 comments on commit 39ced08

Please sign in to comment.