aboutsummaryrefslogtreecommitdiffstats
path: root/root_commands.c
diff options
context:
space:
mode:
Diffstat (limited to 'root_commands.c')
-rw-r--r--root_commands.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/root_commands.c b/root_commands.c
index f55c4b5e..56a405a3 100644
--- a/root_commands.c
+++ b/root_commands.c
@@ -609,6 +609,8 @@ static void cmd_rename( irc_t *irc, char **cmd )
g_free( irc->mynick );
irc->mynick = g_strdup( cmd[2] );
+ /* If we're called internally (user did "set root_nick"),
+ let's not go O(INF). :-) */
if( strcmp( cmd[0], "set_rename" ) != 0 )
set_setstr( &irc->set, "root_nick", cmd[2] );
}
@@ -632,7 +634,7 @@ char *set_eval_root_nick( set_t *set, char *new_nick )
cmd_rename( irc, cmd );
}
- return strcmp( irc->mynick, new_nick ) == 0 ? new_nick : NULL;
+ return strcmp( irc->mynick, new_nick ) == 0 ? new_nick : SET_INVALID;
}
static void cmd_remove( irc_t *irc, char **cmd )