Changeset 6d544a1 for protocols


Ignore:
Timestamp:
2010-11-20T11:48:04Z (14 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
ef043d3
Parents:
4eb75b2
Message:

Restore support for joining password-protected Jabber rooms. Now using a
simple Jabber-specific room setting since AFAIK room passwords are pretty
uncommon otherwise. Should deprecate the "password" argument to chat_join
but that's a PITA because of API compatibility. :-/

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/jabber/jabber.c

    r4eb75b2 r6d544a1  
    460460                imcb_error( ic, "Already present in chat `%s'", room );
    461461        else
    462                 return jabber_chat_join( ic, room, nick, password );
     462                return jabber_chat_join( ic, room, nick, set_getstr( sets, "password" ) );
    463463       
    464464        return NULL;
     
    552552}
    553553
     554void jabber_chat_add_settings( account_t *acc, set_t **head )
     555{
     556        /* Meh. Stupid room passwords. Not trying to obfuscate/hide
     557           them from the user for now. */
     558        set_add( head, "password", NULL, NULL, NULL );
     559}
     560
     561void jabber_chat_free_settings( account_t *acc, set_t **head )
     562{
     563        set_del( head, "password" );
     564}
     565
    554566void jabber_initmodule()
    555567{
     
    557569       
    558570        ret->name = "jabber";
    559     ret->mms = 0;                        /* no limit */
     571        ret->mms = 0;                        /* no limit */
    560572        ret->login = jabber_login;
    561573        ret->init = jabber_init;
     
    573585        ret->chat_leave = jabber_chat_leave_;
    574586        ret->chat_join = jabber_chat_join_;
     587        ret->chat_add_settings = jabber_chat_add_settings;
     588        ret->chat_free_settings = jabber_chat_free_settings;
    575589        ret->keepalive = jabber_keepalive;
    576590        ret->send_typing = jabber_send_typing;
Note: See TracChangeset for help on using the changeset viewer.