Mercurial > hg
changeset 1166:c4da23bf8958
Add option 'muc_flag_joins'
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Sat, 17 Feb 2007 15:14:39 +0100 |
parents | d5b26a0a9771 |
children | 9726c78a91f3 |
files | mcabber/mcabberrc.example mcabber/src/jabglue.c |
diffstat | 2 files changed, 17 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/mcabber/mcabberrc.example Sat Feb 17 11:38:07 2007 +0100 +++ b/mcabber/mcabberrc.example Sat Feb 17 15:14:39 2007 +0100 @@ -196,6 +196,10 @@ #set delete_on_reject = 0 # MUC +# Set 'muc_flag_joins' to 1 if you want the MUC rooms to be flagged in +# the roster when somebody joins a room. Set it to 2 if you want a flag +# for leaves too. +#set muc_flag_joins = 0 # Set 'muc_auto_whois' to 1 if you want to call /room whois each time # somebody joins a room. (default: 0) #set muc_auto_whois = 0
--- a/mcabber/src/jabglue.c Sat Feb 17 11:38:07 2007 +0100 +++ b/mcabber/src/jabglue.c Sat Feb 17 15:14:39 2007 +0100 @@ -1946,7 +1946,8 @@ mbuf = g_strdup_printf("%s is now known as %s", rname, mbnick); scr_WriteIncomingMessage(roomjid, mbuf, usttime, HBB_PREFIX_INFO|HBB_PREFIX_NOFLAG); - if (log_muc_conf) hlog_write_message(roomjid, 0, FALSE, mbuf); + if (log_muc_conf) + hlog_write_message(roomjid, 0, FALSE, mbuf); g_free(mbuf); buddy_resource_setname(room_elt->data, rname, mbnick); // Maybe it's _our_ nickname... @@ -2026,12 +2027,13 @@ } msgflags = HBB_PREFIX_INFO; - if (!we_left) + if (!we_left && settings_opt_get_int("muc_flag_joins") != 2) msgflags |= HBB_PREFIX_NOFLAG; scr_WriteIncomingMessage(roomjid, mbuf, usttime, msgflags); - if (log_muc_conf) hlog_write_message(roomjid, 0, FALSE, mbuf); + if (log_muc_conf) + hlog_write_message(roomjid, 0, FALSE, mbuf); if (we_left) { scr_LogPrint(LPRINT_LOGNORM, "%s", mbuf); @@ -2062,7 +2064,8 @@ // so we use 0 here. scr_WriteIncomingMessage(roomjid, mbuf, 0, HBB_PREFIX_INFO|HBB_PREFIX_NOFLAG); - if (log_muc_conf) hlog_write_message(roomjid, 0, FALSE, mbuf); + if (log_muc_conf) + hlog_write_message(roomjid, 0, FALSE, mbuf); g_free(mbuf); mbuf = g_strdup_printf("%s has joined", rname); new_member = TRUE; @@ -2076,9 +2079,12 @@ } if (mbuf) { - scr_WriteIncomingMessage(roomjid, mbuf, usttime, - HBB_PREFIX_INFO|HBB_PREFIX_NOFLAG); - if (log_muc_conf) hlog_write_message(roomjid, 0, FALSE, mbuf); + msgflags = HBB_PREFIX_INFO; + if (!settings_opt_get_int("muc_flag_joins")) + msgflags |= HBB_PREFIX_NOFLAG; + scr_WriteIncomingMessage(roomjid, mbuf, usttime, msgflags); + if (log_muc_conf) + hlog_write_message(roomjid, 0, FALSE, mbuf); g_free(mbuf); } }