From 0a6e5d1fd4e0c33e0529db7f94aae66b3f995f84 Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Mon, 7 Jun 2010 16:51:31 +0100 Subject: Restore "set root_nick" behaviour. All disabled set evaluators are back now. Getting *very* close to "feature parity" now! --- irc.c | 2 +- root_commands.c | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/irc.c b/irc.c index 281b1fd5..4593db8d 100644 --- a/irc.c +++ b/irc.c @@ -115,7 +115,7 @@ irc_t *irc_new( int fd ) s->flags |= SET_NULL_OK; s = set_add( &b->set, "private", "true", set_eval_bool, irc ); s = set_add( &b->set, "query_order", "lifo", NULL, irc ); - s = set_add( &b->set, "root_nick", ROOT_NICK, NULL/*set_eval_root_nick*/, irc ); + s = set_add( &b->set, "root_nick", ROOT_NICK, set_eval_root_nick, irc ); s = set_add( &b->set, "simulate_netsplit", "true", set_eval_bool, irc ); s = set_add( &b->set, "timezone", "local", set_eval_timezone, irc ); s = set_add( &b->set, "to_char", ": ", set_eval_to_char, irc ); diff --git a/root_commands.c b/root_commands.c index 72dec6f1..a9106781 100644 --- a/root_commands.c +++ b/root_commands.c @@ -718,21 +718,19 @@ static void cmd_rename( irc_t *irc, char **cmd ) } } -#if 0 char *set_eval_root_nick( set_t *set, char *new_nick ) { irc_t *irc = set->data; - if( strcmp( irc->mynick, new_nick ) != 0 ) + if( strcmp( irc->root->nick, new_nick ) != 0 ) { - char *cmd[] = { "set_rename", irc->mynick, new_nick, NULL }; + char *cmd[] = { "set_rename", irc->root->nick, new_nick, NULL }; cmd_rename( irc, cmd ); } - return strcmp( irc->mynick, new_nick ) == 0 ? new_nick : SET_INVALID; + return strcmp( irc->root->nick, new_nick ) == 0 ? new_nick : SET_INVALID; } -#endif static void cmd_block( irc_t *irc, char **cmd ) { -- cgit v1.2.3