summaryrefslogtreecommitdiff
path: root/src/plugins/jabber
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/jabber')
-rw-r--r--src/plugins/jabber/jabber-command.c2
-rw-r--r--src/plugins/jabber/jabber-muc.c7
-rw-r--r--src/plugins/jabber/jabber-muc.h3
-rw-r--r--src/plugins/jabber/jabber-server.c2
-rw-r--r--src/plugins/jabber/jabber-upgrade.c2
-rw-r--r--src/plugins/jabber/jabber-xmpp.c2
6 files changed, 11 insertions, 7 deletions
diff --git a/src/plugins/jabber/jabber-command.c b/src/plugins/jabber/jabber-command.c
index 900e8e71d..8937cb6bd 100644
--- a/src/plugins/jabber/jabber-command.c
+++ b/src/plugins/jabber/jabber-command.c
@@ -466,7 +466,7 @@ jabber_command_jchat (void *data, struct t_gui_buffer *buffer, int argc,
{
ptr_muc = jabber_muc_new (ptr_server,
JABBER_MUC_TYPE_PRIVATE,
- argv[1], 1);
+ argv[1], 1, 0);
if (!ptr_muc)
{
weechat_printf (ptr_server->buffer,
diff --git a/src/plugins/jabber/jabber-muc.c b/src/plugins/jabber/jabber-muc.c
index 80a1e8787..99e516ee6 100644
--- a/src/plugins/jabber/jabber-muc.c
+++ b/src/plugins/jabber/jabber-muc.c
@@ -65,7 +65,7 @@ jabber_muc_valid (struct t_jabber_server *server, struct t_jabber_muc *muc)
struct t_jabber_muc *
jabber_muc_new (struct t_jabber_server *server, int muc_type,
- const char *muc_name, int switch_to_muc)
+ const char *muc_name, int switch_to_muc, int auto_switch)
{
struct t_jabber_muc *new_muc;
struct t_gui_buffer *new_buffer;
@@ -161,7 +161,10 @@ jabber_muc_new (struct t_jabber_server *server, int muc_type,
server->last_muc = new_muc;
if (switch_to_muc)
- weechat_buffer_set (new_buffer, "display", "1");
+ {
+ weechat_buffer_set (new_buffer, "display",
+ (auto_switch) ? "auto" : "1");
+ }
/* all is ok, return address of new muc */
return new_muc;
diff --git a/src/plugins/jabber/jabber-muc.h b/src/plugins/jabber/jabber-muc.h
index 4d0e81604..1a33bb2d3 100644
--- a/src/plugins/jabber/jabber-muc.h
+++ b/src/plugins/jabber/jabber-muc.h
@@ -68,7 +68,8 @@ extern int jabber_muc_valid (struct t_jabber_server *server,
extern struct t_jabber_muc *jabber_muc_new (struct t_jabber_server *server,
int muc_type,
const char *muc_name,
- int switch_to_muc);
+ int switch_to_muc,
+ int auto_switch);
extern void jabber_muc_set_topic (struct t_jabber_muc *muc,
const char *topic);
extern void jabber_muc_free (struct t_jabber_server *server,
diff --git a/src/plugins/jabber/jabber-server.c b/src/plugins/jabber/jabber-server.c
index 40467c57a..852ceea3c 100644
--- a/src/plugins/jabber/jabber-server.c
+++ b/src/plugins/jabber/jabber-server.c
@@ -1103,7 +1103,7 @@ jabber_server_connect (struct t_jabber_server *server)
charset_modifier);
}
- weechat_buffer_set (server->buffer, "display", "1");
+ weechat_buffer_set (server->buffer, "display", "auto");
weechat_bar_item_update ("buffer_name");
diff --git a/src/plugins/jabber/jabber-upgrade.c b/src/plugins/jabber/jabber-upgrade.c
index 77aa5b73b..05942c734 100644
--- a/src/plugins/jabber/jabber-upgrade.c
+++ b/src/plugins/jabber/jabber-upgrade.c
@@ -228,7 +228,7 @@ jabber_upgrade_read_cb (int object_id,
jabber_upgrade_current_muc = jabber_muc_new (jabber_upgrade_current_server,
weechat_infolist_integer (infolist, "type"),
weechat_infolist_string (infolist, "name"),
- 0);
+ 0, 0);
if (jabber_upgrade_current_muc)
{
str = weechat_infolist_string (infolist, "topic");
diff --git a/src/plugins/jabber/jabber-xmpp.c b/src/plugins/jabber/jabber-xmpp.c
index e33b8db54..d2730c8cb 100644
--- a/src/plugins/jabber/jabber-xmpp.c
+++ b/src/plugins/jabber/jabber-xmpp.c
@@ -130,7 +130,7 @@ jabber_xmpp_recv_chat_message (struct t_jabber_server *server,
{
ptr_muc = jabber_muc_new (server,
JABBER_MUC_TYPE_PRIVATE,
- from, 0);
+ from, 0, 0);
if (!ptr_muc)
{
weechat_printf (server->buffer,