diff options
author | dequis <dx@dxzone.com.ar> | 2016-03-10 02:20:31 -0300 |
---|---|---|
committer | dequis <dx@dxzone.com.ar> | 2016-03-20 00:58:05 -0300 |
commit | 3320d6d9868729ce1d7b5a90866554bc898a1fa3 (patch) | |
tree | ede2c0d459956c4345e0c48a9deb169c1b35e721 /protocols/jabber/jabber.c | |
parent | 63825d6c4c22c15c48db35ce6d23e1b8ced8c79c (diff) |
jabber: Add "always_use_nicks" setting, for non-anonymous MUCs
Basically the same thing as github PR #55, which fixes trac bug 415,
but this one conditionalized that behavior and uses the API introduced a
few commits ago.
I didn't think too much about the setting name and i'm open to changing
it to anything else
Diffstat (limited to 'protocols/jabber/jabber.c')
-rw-r--r-- | protocols/jabber/jabber.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/protocols/jabber/jabber.c b/protocols/jabber/jabber.c index 6e7b89af..11a90ff4 100644 --- a/protocols/jabber/jabber.c +++ b/protocols/jabber/jabber.c @@ -576,7 +576,8 @@ static struct groupchat *jabber_chat_join_(struct im_connection *ic, const char imcb_error(ic, "Already present in chat `%s'", room); } else { /* jabber_chat_join without the underscore is the conference.c one */ - return jabber_chat_join(ic, room, final_nick, set_getstr(sets, "password")); + return jabber_chat_join(ic, room, final_nick, set_getstr(sets, "password"), + set_getbool(sets, "always_use_nicks")); } return NULL; @@ -685,6 +686,8 @@ static int jabber_send_typing(struct im_connection *ic, char *who, int typing) void jabber_chat_add_settings(account_t *acc, set_t **head) { + set_add(head, "always_use_nicks", "false", set_eval_bool, NULL); + /* Meh. Stupid room passwords. Not trying to obfuscate/hide them from the user for now. */ set_add(head, "password", NULL, NULL, NULL); @@ -692,6 +695,8 @@ void jabber_chat_add_settings(account_t *acc, set_t **head) void jabber_chat_free_settings(account_t *acc, set_t **head) { + set_del(head, "always_use_nicks"); + set_del(head, "password"); } |