Changeset 7125cb3 for root_commands.c


Ignore:
Timestamp:
2008-08-24T18:01:05Z (11 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
f3579fd
Parents:
934dddf3
Message:

Added SET_INVALID, which set evaluators should now return instead of NULL
when the given value is not accepted. This to allow certain variables
actually be set to NULL (server, for example). This should fully close
#444.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • root_commands.c

    r934dddf3 r7125cb3  
    610610                        irc->mynick = g_strdup( cmd[2] );
    611611                       
     612                        /* If we're called internally (user did "set root_nick"),
     613                           let's not go O(INF). :-) */
    612614                        if( strcmp( cmd[0], "set_rename" ) != 0 )
    613615                                set_setstr( &irc->set, "root_nick", cmd[2] );
     
    633635        }
    634636       
    635         return strcmp( irc->mynick, new_nick ) == 0 ? new_nick : NULL;
     637        return strcmp( irc->mynick, new_nick ) == 0 ? new_nick : SET_INVALID;
    636638}
    637639
Note: See TracChangeset for help on using the changeset viewer.