diff --git a/account.c b/account.c index 9186b61..4943e83 100644 --- a/account.c +++ b/account.c @@ -31,7 +31,6 @@ char *account_options[ACCOUNT_NUM_OPTIONS][2] = { "autoconnect", "" }, { "resource", "" }, { "status", "probably about to segfault" }, - { "autojoin", "" }, }; struct t_account *account__search(const char *name) diff --git a/account.h b/account.h index 7f1015b..342da5d 100644 --- a/account.h +++ b/account.h @@ -17,7 +17,6 @@ enum t_account_option ACCOUNT_OPTION_AUTOCONNECT, ACCOUNT_OPTION_RESOURCE, ACCOUNT_OPTION_STATUS, - ACCOUNT_OPTION_AUTOJOIN, ACCOUNT_NUM_OPTIONS, }; @@ -55,8 +54,6 @@ enum t_account_option weechat_config_string(account->options[ACCOUNT_OPTION_RESOURCE]) #define account_status(account) \ weechat_config_string(account->options[ACCOUNT_OPTION_STATUS]) -#define account_autojoin(account) \ - weechat_config_string(account->options[ACCOUNT_OPTION_AUTOJOIN]) struct t_device { diff --git a/channel.c b/channel.c index 8c7f51e..6205ed9 100644 --- a/channel.c +++ b/channel.c @@ -613,15 +613,17 @@ struct t_channel_member *channel__add_member(struct t_account *account, char *jid_resource = xmpp_jid_resource(account->context, user->id); if (weechat_strcasecmp(jid_bare, channel->id) == 0 && channel->type == CHANNEL_TYPE_MUC) - weechat_printf_date_tags(channel->buffer, 0, "xmpp_presence,enter,log4", "%s%s entered", + weechat_printf_date_tags(channel->buffer, 0, "xmpp_presence,enter,log4", "%s%s entered %s", weechat_prefix("join"), - user__as_prefix_raw(account, jid_resource)); + user__as_prefix_raw(account, jid_resource), + channel->id); else - weechat_printf_date_tags(channel->buffer, 0, "xmpp_presence,enter,log4", "%s%s (%s) entered", + weechat_printf_date_tags(channel->buffer, 0, "xmpp_presence,enter,log4", "%s%s (%s) entered %s", weechat_prefix("join"), xmpp_jid_bare(account->context, user->id), user__as_prefix_raw(account, - xmpp_jid_resource(account->context, user->id))); + xmpp_jid_resource(account->context, user->id)), + channel->id); return member; } @@ -703,14 +705,16 @@ struct t_channel_member *channel__remove_member(struct t_account *account, char *jid_resource = xmpp_jid_resource(account->context, user->id); if (weechat_strcasecmp(jid_bare, channel->id) == 0 && channel->type == CHANNEL_TYPE_MUC) - weechat_printf_date_tags(channel->buffer, 0, "xmpp_presence,leave,log4", "%s%s left", + weechat_printf_date_tags(channel->buffer, 0, "xmpp_presence,leave,log4", "%s%s left %s", weechat_prefix("quit"), - jid_resource); + jid_resource, + channel->id); else - weechat_printf_date_tags(channel->buffer, 0, "xmpp_presence,leave,log4", "%s%s (%s) left", + weechat_printf_date_tags(channel->buffer, 0, "xmpp_presence,leave,log4", "%s%s (%s) left %s", weechat_prefix("quit"), xmpp_jid_bare(account->context, user->id), - xmpp_jid_resource(account->context, user->id)); + xmpp_jid_resource(account->context, user->id), + channel->id); return member; } @@ -749,7 +753,7 @@ void channel__send_message(struct t_account *account, struct t_channel *channel, xmpp_send(account->connection, message); xmpp_stanza_release(message); if (channel->type != CHANNEL_TYPE_MUC) - weechat_printf(channel->buffer, "%s%s", + weechat_printf(channel->buffer, "%s\t%s", user__as_prefix_raw(account, account_jid(account)), body); } diff --git a/config.c b/config.c index 8718d03..b7e6c66 100644 --- a/config.c +++ b/config.c @@ -186,22 +186,6 @@ config__account_new_option (struct t_config_file *config_file, callback_change_data, NULL, NULL, NULL); break; - case ACCOUNT_OPTION_AUTOJOIN: - new_option = weechat_config_new_option ( - config_file, section, - option_name, "string", - N_("XMPP MUC Autojoins"), - NULL, 0, 0, - default_value, value, - null_value_allowed, - callback_check_value, - callback_check_value_pointer, - callback_check_value_data, - callback_change, - callback_change_pointer, - callback_change_data, - NULL, NULL, NULL); - break; case ACCOUNT_NUM_OPTIONS: break; }