Ticket #929: 0001-set-del-nick-fix.patch

File 0001-set-del-nick-fix.patch, 1020 bytes (added by Artem Savkov <artem.savkov@…>, at 2012-03-07T18:25:02Z)
  • irc_im.c

    From 9d1ad951dcd2bbe940b152d6c00e2bc21662bafa Mon Sep 17 00:00:00 2001
    From: Artem Savkov <artem.savkov@gmail.com>
    Date: Wed, 7 Mar 2012 22:20:13 +0400
    Subject: [PATCH] set -del nick fix
    
    Added SET_NULL_OK flag to "nick" set variable, so channel <id> set -del nick
    would work properly.
    ---
     irc_im.c |    7 ++++++-
     1 file changed, 6 insertions(+), 1 deletion(-)
    
    diff --git a/irc_im.c b/irc_im.c
    index a883d46..4407272 100644
    a b static char *set_eval_chat_type( set_t *set, char *value ); 
    964964
    965965static gboolean bee_irc_channel_init( irc_channel_t *ic )
    966966{
     967        set_t *s;
     968
    967969        set_add( &ic->set, "account", NULL, set_eval_room_account, ic );
    968970        set_add( &ic->set, "chat_type", "groupchat", set_eval_chat_type, ic );
    969         set_add( &ic->set, "nick", NULL, NULL, ic );
     971
     972        s = set_add( &ic->set, "nick", NULL, NULL, ic );
     973        s->flags |= SET_NULL_OK;
     974
    970975        set_add( &ic->set, "room", NULL, NULL, ic );
    971976        set_add( &ic->set, "translate_to_nicks", "true", set_eval_bool, ic );
    972977