From 3320d6d9868729ce1d7b5a90866554bc898a1fa3 Mon Sep 17 00:00:00 2001 From: dequis Date: Thu, 10 Mar 2016 02:20:31 -0300 Subject: 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 --- protocols/jabber/jabber.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'protocols/jabber/jabber.c') 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"); } -- cgit v1.2.3