Skip to content

Commit 39ced08

Browse files
committed
Core(fix): correct nick generation
1 parent 7b7b930 commit 39ced08

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/core/app_irc_event.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1378,13 +1378,13 @@ static void irc_event_numeric(SircSession *sirc, int event,
13781378
if (!srv->registered){
13791379
char *new_nick;
13801380

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

13901390
// FIXME: ircd-seven will truncate the nick without

0 commit comments

Comments
 (0)