summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2005-07-19 09:46:23 +0000
committerSebastien Helleu <flashcode@flashtux.org>2005-07-19 09:46:23 +0000
commit8166d1523548681e36cabd52eaf6a7981d8fb935 (patch)
treea2ef0892b9a13f9501072ae7d6f5301931f937c6
parent575525d965ae8ba2e23e7cb02aa0acb1e2ad9725 (diff)
downloadweechat-8166d1523548681e36cabd52eaf6a7981d8fb935.zip
Fixed auto-rejoin for channels with key
-rw-r--r--ChangeLog3
-rw-r--r--src/common/command.c4
-rw-r--r--src/irc/irc-recv.c9
-rw-r--r--weechat/ChangeLog3
-rw-r--r--weechat/src/common/command.c4
-rw-r--r--weechat/src/irc/irc-recv.c9
6 files changed, 26 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 8fb915730..674441b1d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,10 +1,11 @@
WeeChat - Wee Enhanced Environment for Chat
===========================================
-ChangeLog - 2005-07-17
+ChangeLog - 2005-07-19
Version 0.1.4 (under dev!):
+ * fixed auto-rejoin for channels with key
* fixed /ctcp command (now any command/data allowed)
* added /amsg command (send text to all channels of all connected servers)
* fixed SIGSEGV handler (now write a core file by aborting program)
diff --git a/src/common/command.c b/src/common/command.c
index beeb2cb83..b8230af9c 100644
--- a/src/common/command.c
+++ b/src/common/command.c
@@ -971,7 +971,9 @@ weechat_cmd_buffer (int argc, char **argv)
{
if (SERVER(gui_current_window->buffer))
{
- if (SERVER(gui_current_window->buffer)->is_connected)
+ if (SERVER(gui_current_window->buffer)->is_connected
+ && CHANNEL(gui_current_window->buffer)
+ && CHANNEL(gui_current_window->buffer)->nicks)
irc_cmd_send_part (SERVER(gui_current_window->buffer), NULL);
else
{
diff --git a/src/irc/irc-recv.c b/src/irc/irc-recv.c
index 41e6cc04f..f84e9286f 100644
--- a/src/irc/irc-recv.c
+++ b/src/irc/irc-recv.c
@@ -2052,7 +2052,14 @@ irc_cmd_recv_004 (t_irc_server *server, char *host, char *arguments)
ptr_channel = ptr_channel->next_channel)
{
if (ptr_channel->type == CHAT_CHANNEL)
- server_sendf (server, "JOIN %s\r\n", ptr_channel->name);
+ {
+ if (ptr_channel->key)
+ server_sendf (server, "JOIN %s %s\r\n",
+ ptr_channel->name, ptr_channel->key);
+ else
+ server_sendf (server, "JOIN %s\r\n",
+ ptr_channel->name);
+ }
}
server->reconnect_join = 0;
}
diff --git a/weechat/ChangeLog b/weechat/ChangeLog
index 8fb915730..674441b1d 100644
--- a/weechat/ChangeLog
+++ b/weechat/ChangeLog
@@ -1,10 +1,11 @@
WeeChat - Wee Enhanced Environment for Chat
===========================================
-ChangeLog - 2005-07-17
+ChangeLog - 2005-07-19
Version 0.1.4 (under dev!):
+ * fixed auto-rejoin for channels with key
* fixed /ctcp command (now any command/data allowed)
* added /amsg command (send text to all channels of all connected servers)
* fixed SIGSEGV handler (now write a core file by aborting program)
diff --git a/weechat/src/common/command.c b/weechat/src/common/command.c
index beeb2cb83..b8230af9c 100644
--- a/weechat/src/common/command.c
+++ b/weechat/src/common/command.c
@@ -971,7 +971,9 @@ weechat_cmd_buffer (int argc, char **argv)
{
if (SERVER(gui_current_window->buffer))
{
- if (SERVER(gui_current_window->buffer)->is_connected)
+ if (SERVER(gui_current_window->buffer)->is_connected
+ && CHANNEL(gui_current_window->buffer)
+ && CHANNEL(gui_current_window->buffer)->nicks)
irc_cmd_send_part (SERVER(gui_current_window->buffer), NULL);
else
{
diff --git a/weechat/src/irc/irc-recv.c b/weechat/src/irc/irc-recv.c
index 41e6cc04f..f84e9286f 100644
--- a/weechat/src/irc/irc-recv.c
+++ b/weechat/src/irc/irc-recv.c
@@ -2052,7 +2052,14 @@ irc_cmd_recv_004 (t_irc_server *server, char *host, char *arguments)
ptr_channel = ptr_channel->next_channel)
{
if (ptr_channel->type == CHAT_CHANNEL)
- server_sendf (server, "JOIN %s\r\n", ptr_channel->name);
+ {
+ if (ptr_channel->key)
+ server_sendf (server, "JOIN %s %s\r\n",
+ ptr_channel->name, ptr_channel->key);
+ else
+ server_sendf (server, "JOIN %s\r\n",
+ ptr_channel->name);
+ }
}
server->reconnect_join = 0;
}