summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--doc/de/autogen/user/irc_commands.txt10
-rw-r--r--doc/en/autogen/user/irc_commands.txt4
-rw-r--r--doc/fr/autogen/user/irc_commands.txt8
-rw-r--r--doc/it/autogen/user/irc_commands.txt12
-rw-r--r--po/cs.po10
-rw-r--r--po/de.po10
-rw-r--r--po/es.po10
-rw-r--r--po/fr.po22
-rw-r--r--po/hu.po8
-rw-r--r--po/it.po10
-rw-r--r--po/pl.po10
-rw-r--r--po/pt_BR.po8
-rw-r--r--po/ru.po8
-rw-r--r--po/weechat.pot8
-rw-r--r--src/plugins/irc/irc-command.c50
16 files changed, 129 insertions, 62 deletions
diff --git a/ChangeLog b/ChangeLog
index 31cff3b14..ec075ee08 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,7 @@
WeeChat ChangeLog
=================
Sébastien Helleu <flashcode@flashtux.org>
-v0.3.4-rc2, 2010-12-26
+v0.3.4-rc2, 2010-12-27
Version 0.3.4 (under dev!)
@@ -48,6 +48,7 @@ Version 0.3.4 (under dev!)
nicklist_nick_get_integer, nicklist_nick_get_string, nicklist_nick_get_pointer,
nicklist_nick_set
* alias: complete with alias value for second argument of command /alias
+* irc: add option "-server" to command /join (task #10837)
* irc: fix bug with charset decoding on private buffers (decoding was made for
local nick instead of remote nick) (bug #31890)
* irc: add option "-switch" to commands /connect and /reconnect
diff --git a/doc/de/autogen/user/irc_commands.txt b/doc/de/autogen/user/irc_commands.txt
index 2db0e7a11..85644920f 100644
--- a/doc/de/autogen/user/irc_commands.txt
+++ b/doc/de/autogen/user/irc_commands.txt
@@ -196,17 +196,19 @@
Nickname: Nickname
........................................
-&bull; *`/join`* `[channel1[,channel2[,channel3]] [key1[,key2]]]`::
+&bull; *`/join`* `[-server server] [channel1[,channel2[,channel3]] [key1[,key2]]]`::
........................................
einen Channel betreten
- channel: Name des Channels der betreten werden soll
- key: Zugriffsschlüssel für einen Channel (Channels die einen Zugriffsschlüssel benötigen müssen zuerst aufgeführt werden)
+ server: send to this server (internal name)
+ channel: channel name to join
+ key: key to join the channel (channels with a key must be the first in list)
Examples:
/join #weechat
- /join #geschützterChannel,#weechat Zugriffsschlüssel
+ /join #protectedchan,#weechat key
+ /join -server freenode #weechat
........................................
&bull; *`/kick`* `[channel] nickname [comment]`::
diff --git a/doc/en/autogen/user/irc_commands.txt b/doc/en/autogen/user/irc_commands.txt
index 61f3a9a3e..7a642031b 100644
--- a/doc/en/autogen/user/irc_commands.txt
+++ b/doc/en/autogen/user/irc_commands.txt
@@ -196,17 +196,19 @@
nickname: nickname
........................................
-&bull; *`/join`* `[channel1[,channel2[,channel3]] [key1[,key2]]]`::
+&bull; *`/join`* `[-server server] [channel1[,channel2[,channel3]] [key1[,key2]]]`::
........................................
join a channel
+ server: send to this server (internal name)
channel: channel name to join
key: key to join the channel (channels with a key must be the first in list)
Examples:
/join #weechat
/join #protectedchan,#weechat key
+ /join -server freenode #weechat
........................................
&bull; *`/kick`* `[channel] nickname [comment]`::
diff --git a/doc/fr/autogen/user/irc_commands.txt b/doc/fr/autogen/user/irc_commands.txt
index f7be6afc3..45d4814fb 100644
--- a/doc/fr/autogen/user/irc_commands.txt
+++ b/doc/fr/autogen/user/irc_commands.txt
@@ -196,17 +196,19 @@
pseudo: pseudo
........................................
-&bull; *`/join`* `[canal1[,canal2[,canal3]] [clé1[,clé2]]]`::
+&bull; *`/join`* `[-server serveur] [canal1[,canal2[,canal3]] [clé1[,clé2]]]`::
........................................
joindre un canal
- canal: nom du canal à rejoindre
- clé: clé pour rejoindre le canal (les canaux avec une clé doivent être les premiers dans la liste)
+ serveur: envoyer à ce serveur (nom interne)
+ canal: nom du canal à rejoindre
+ clé: clé pour rejoindre le canal (les canaux avec une clé doivent être les premiers dans la liste)
Exemples:
/join #weechat
/join #protectedchan,#weechat key
+ /join -server freenode #weechat
........................................
&bull; *`/kick`* `[canal] pseudo [commentaire]`::
diff --git a/doc/it/autogen/user/irc_commands.txt b/doc/it/autogen/user/irc_commands.txt
index 81475c3ec..cb7366b24 100644
--- a/doc/it/autogen/user/irc_commands.txt
+++ b/doc/it/autogen/user/irc_commands.txt
@@ -196,17 +196,19 @@
nick: nick
........................................
-&bull; *`/join`* `[canale1[,canale2[,canale3]] [chiave1[,chiave2]]]`::
+&bull; *`/join`* `[-server server] [channel1[,channel2[,channel3]] [key1[,key2]]]`::
........................................
entra in un canale
- canale: nome del canale in cui entrare
- chiave: chiave per entrare nel canale (i canali con una chiave devono essere primi nella lista)
+ server: send to this server (internal name)
+ channel: channel name to join
+ key: key to join the channel (channels with a key must be the first in list)
- Esempi:
+ Examples:
/join #weechat
- /join #canaleprotetto,#weechat chiave
+ /join #protectedchan,#weechat key
+ /join -server freenode #weechat
........................................
&bull; *`/kick`* `[canale] nick [commento]`::
diff --git a/po/cs.po b/po/cs.po
index 78be39f48..8c3ef1f96 100644
--- a/po/cs.po
+++ b/po/cs.po
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.4-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2010-12-26 12:13+0100\n"
+"POT-Creation-Date: 2010-12-27 11:05+0100\n"
"PO-Revision-Date: 2010-11-06 11:55+0100\n"
"Last-Translator: Jiri Golembiovsky <golemj@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -3658,17 +3658,21 @@ msgstr "přezdívka: přezdívka"
msgid "join a channel"
msgstr "připojit se ke kanálu"
-msgid "[channel1[,channel2[,channel3]] [key1[,key2]]]"
+#, fuzzy
+msgid "[-server server] [channel1[,channel2[,channel3]] [key1[,key2]]]"
msgstr "[kanál1[,kanál2[,kanál3]] [klíč1[,klíč2]]]"
+#, fuzzy
msgid ""
+" server: send to this server (internal name)\n"
"channel: channel name to join\n"
" key: key to join the channel (channels with a key must be the first in "
"list)\n"
"\n"
"Examples:\n"
" /join #weechat\n"
-" /join #protectedchan,#weechat key"
+" /join #protectedchan,#weechat key\n"
+" /join -server freenode #weechat"
msgstr ""
"kanál: jméno kanálu pro připojení\n"
" klíč: klíč pro připojení ke kanálu (kanál s klíčem musí být v seznamu "
diff --git a/po/de.po b/po/de.po
index b1bfd1f03..5dcec5a8a 100644
--- a/po/de.po
+++ b/po/de.po
@@ -22,7 +22,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.3-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2010-12-26 12:13+0100\n"
+"POT-Creation-Date: 2010-12-27 11:05+0100\n"
"PO-Revision-Date: 2010-12-21 17:42+0100\n"
"Last-Translator: Nils G.\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -3822,17 +3822,21 @@ msgstr "Nickname: Nickname"
msgid "join a channel"
msgstr "einen Channel betreten"
-msgid "[channel1[,channel2[,channel3]] [key1[,key2]]]"
+#, fuzzy
+msgid "[-server server] [channel1[,channel2[,channel3]] [key1[,key2]]]"
msgstr "[channel1[,channel2[,channel3]] [key1[,key2]]]"
+#, fuzzy
msgid ""
+" server: send to this server (internal name)\n"
"channel: channel name to join\n"
" key: key to join the channel (channels with a key must be the first in "
"list)\n"
"\n"
"Examples:\n"
" /join #weechat\n"
-" /join #protectedchan,#weechat key"
+" /join #protectedchan,#weechat key\n"
+" /join -server freenode #weechat"
msgstr ""
"channel: Name des Channels der betreten werden soll\n"
" key: Zugriffsschlüssel für einen Channel (Channels die einen "
diff --git a/po/es.po b/po/es.po
index f8c1784d9..afa6987ff 100644
--- a/po/es.po
+++ b/po/es.po
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.4-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2010-12-26 12:13+0100\n"
+"POT-Creation-Date: 2010-12-27 11:05+0100\n"
"PO-Revision-Date: 2010-11-06 11:56+0100\n"
"Last-Translator: Elián Hanisch <lambdae2@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -3707,17 +3707,21 @@ msgstr "apodo: apodo"
msgid "join a channel"
msgstr "unirse a un canal"
-msgid "[channel1[,channel2[,channel3]] [key1[,key2]]]"
+#, fuzzy
+msgid "[-server server] [channel1[,channel2[,channel3]] [key1[,key2]]]"
msgstr "[canal1[,canal2[,canal3]] [clave1[,clave2]]]"
+#, fuzzy
msgid ""
+" server: send to this server (internal name)\n"
"channel: channel name to join\n"
" key: key to join the channel (channels with a key must be the first in "
"list)\n"
"\n"
"Examples:\n"
" /join #weechat\n"
-" /join #protectedchan,#weechat key"
+" /join #protectedchan,#weechat key\n"
+" /join -server freenode #weechat"
msgstr ""
"canal: nombre del canal a unirse\n"
"clave: clave para unirse al canal (canales con clave deben ser los primeros "
diff --git a/po/fr.po b/po/fr.po
index 57b0ee1f6..f64c6452b 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -21,8 +21,8 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.4-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2010-12-26 12:13+0100\n"
-"PO-Revision-Date: 2010-12-26 11:51+0100\n"
+"POT-Creation-Date: 2010-12-27 11:05+0100\n"
+"PO-Revision-Date: 2010-12-27 11:06+0100\n"
"Last-Translator: Sebastien Helleu <flashcode@flashtux.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
"Language: French\n"
@@ -3760,25 +3760,29 @@ msgstr "pseudo: pseudo"
msgid "join a channel"
msgstr "joindre un canal"
-msgid "[channel1[,channel2[,channel3]] [key1[,key2]]]"
-msgstr "[canal1[,canal2[,canal3]] [clé1[,clé2]]]"
+msgid "[-server server] [channel1[,channel2[,channel3]] [key1[,key2]]]"
+msgstr "[-server serveur] [canal1[,canal2[,canal3]] [clé1[,clé2]]]"
msgid ""
+" server: send to this server (internal name)\n"
"channel: channel name to join\n"
" key: key to join the channel (channels with a key must be the first in "
"list)\n"
"\n"
"Examples:\n"
" /join #weechat\n"
-" /join #protectedchan,#weechat key"
+" /join #protectedchan,#weechat key\n"
+" /join -server freenode #weechat"
msgstr ""
-"canal: nom du canal à rejoindre\n"
-" clé: clé pour rejoindre le canal (les canaux avec une clé doivent être les "
-"premiers dans la liste)\n"
+"serveur: envoyer à ce serveur (nom interne)\n"
+" canal: nom du canal à rejoindre\n"
+" clé: clé pour rejoindre le canal (les canaux avec une clé doivent être "
+"les premiers dans la liste)\n"
"\n"
"Exemples:\n"
" /join #weechat\n"
-" /join #protectedchan,#weechat key"
+" /join #protectedchan,#weechat key\n"
+" /join -server freenode #weechat"
msgid "forcibly remove a user from a channel"
msgstr "retirer par la force un utilisateur d'un canal"
diff --git a/po/hu.po b/po/hu.po
index 37452834b..35856a303 100644
--- a/po/hu.po
+++ b/po/hu.po
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.4-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2010-12-26 12:13+0100\n"
+"POT-Creation-Date: 2010-12-27 11:05+0100\n"
"PO-Revision-Date: 2010-11-05 17:17+0100\n"
"Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -3406,17 +3406,19 @@ msgid "join a channel"
msgstr "belépés egy szobába"
#, fuzzy
-msgid "[channel1[,channel2[,channel3]] [key1[,key2]]]"
+msgid "[-server server] [channel1[,channel2[,channel3]] [key1[,key2]]]"
msgstr "szoba[,szoba] [kulcs[,kulcs]]"
msgid ""
+" server: send to this server (internal name)\n"
"channel: channel name to join\n"
" key: key to join the channel (channels with a key must be the first in "
"list)\n"
"\n"
"Examples:\n"
" /join #weechat\n"
-" /join #protectedchan,#weechat key"
+" /join #protectedchan,#weechat key\n"
+" /join -server freenode #weechat"
msgstr ""
msgid "forcibly remove a user from a channel"
diff --git a/po/it.po b/po/it.po
index 477c92924..8cdf5f885 100644
--- a/po/it.po
+++ b/po/it.po
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.4-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2010-12-26 12:13+0100\n"
+"POT-Creation-Date: 2010-12-27 11:05+0100\n"
"PO-Revision-Date: 2010-12-22 11:02+0100\n"
"Last-Translator: Marco Paolone <marcopaolone@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -3727,17 +3727,21 @@ msgstr "nick: nick"
msgid "join a channel"
msgstr "entra in un canale"
-msgid "[channel1[,channel2[,channel3]] [key1[,key2]]]"
+#, fuzzy
+msgid "[-server server] [channel1[,channel2[,channel3]] [key1[,key2]]]"
msgstr "[canale1[,canale2[,canale3]] [chiave1[,chiave2]]]"
+#, fuzzy
msgid ""
+" server: send to this server (internal name)\n"
"channel: channel name to join\n"
" key: key to join the channel (channels with a key must be the first in "
"list)\n"
"\n"
"Examples:\n"
" /join #weechat\n"
-" /join #protectedchan,#weechat key"
+" /join #protectedchan,#weechat key\n"
+" /join -server freenode #weechat"
msgstr ""
"canale: nome del canale in cui entrare\n"
"chiave: chiave per entrare nel canale (i canali con una chiave devono essere "
diff --git a/po/pl.po b/po/pl.po
index 84c86c25d..b41583f26 100644
--- a/po/pl.po
+++ b/po/pl.po
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.4-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2010-12-26 12:13+0100\n"
+"POT-Creation-Date: 2010-12-27 11:05+0100\n"
"PO-Revision-Date: 2010-11-06 11:56+0100\n"
"Last-Translator: Krzysztof Koroscik <soltys@szluug.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -3695,17 +3695,21 @@ msgstr "nick: nazwa użytkownika"
msgid "join a channel"
msgstr "wchodzi na kanał"
-msgid "[channel1[,channel2[,channel3]] [key1[,key2]]]"
+#, fuzzy
+msgid "[-server server] [channel1[,channel2[,channel3]] [key1[,key2]]]"
msgstr "[kanał1[,kanał2[,kanał3]] [klucz[,klucz2]]]"
+#, fuzzy
msgid ""
+" server: send to this server (internal name)\n"
"channel: channel name to join\n"
" key: key to join the channel (channels with a key must be the first in "
"list)\n"
"\n"
"Examples:\n"
" /join #weechat\n"
-" /join #protectedchan,#weechat key"
+" /join #protectedchan,#weechat key\n"
+" /join -server freenode #weechat"
msgstr ""
"kanał: nazwa kanału do wejścia\n"
" klucz: hasło wymagane do wejścia na kanał (kanały wymagające hasła muszą "
diff --git a/po/pt_BR.po b/po/pt_BR.po
index 98fbd6fb2..bdf040755 100644
--- a/po/pt_BR.po
+++ b/po/pt_BR.po
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.4-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2010-12-26 12:13+0100\n"
+"POT-Creation-Date: 2010-12-27 11:05+0100\n"
"PO-Revision-Date: 2010-11-13 09:26+0100\n"
"Last-Translator: Ivan Sichmann Freitas <ivansichfreitas@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -3048,17 +3048,19 @@ msgstr ""
msgid "join a channel"
msgstr ""
-msgid "[channel1[,channel2[,channel3]] [key1[,key2]]]"
+msgid "[-server server] [channel1[,channel2[,channel3]] [key1[,key2]]]"
msgstr ""
msgid ""
+" server: send to this server (internal name)\n"
"channel: channel name to join\n"
" key: key to join the channel (channels with a key must be the first in "
"list)\n"
"\n"
"Examples:\n"
" /join #weechat\n"
-" /join #protectedchan,#weechat key"
+" /join #protectedchan,#weechat key\n"
+" /join -server freenode #weechat"
msgstr ""
msgid "forcibly remove a user from a channel"
diff --git a/po/ru.po b/po/ru.po
index 2a1400beb..43c98213c 100644
--- a/po/ru.po
+++ b/po/ru.po
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.4-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2010-12-26 12:13+0100\n"
+"POT-Creation-Date: 2010-12-27 11:05+0100\n"
"PO-Revision-Date: 2010-11-05 17:17+0100\n"
"Last-Translator: Pavel Shevchuk <stlwrt@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -3425,17 +3425,19 @@ msgid "join a channel"
msgstr "зайти на канал"
#, fuzzy
-msgid "[channel1[,channel2[,channel3]] [key1[,key2]]]"
+msgid "[-server server] [channel1[,channel2[,channel3]] [key1[,key2]]]"
msgstr "канал[,канал] [ключ[,ключ]]"
msgid ""
+" server: send to this server (internal name)\n"
"channel: channel name to join\n"
" key: key to join the channel (channels with a key must be the first in "
"list)\n"
"\n"
"Examples:\n"
" /join #weechat\n"
-" /join #protectedchan,#weechat key"
+" /join #protectedchan,#weechat key\n"
+" /join -server freenode #weechat"
msgstr ""
msgid "forcibly remove a user from a channel"
diff --git a/po/weechat.pot b/po/weechat.pot
index bf96aa72d..2e0b33329 100644
--- a/po/weechat.pot
+++ b/po/weechat.pot
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2010-12-26 12:13+0100\n"
+"POT-Creation-Date: 2010-12-27 11:05+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -2984,17 +2984,19 @@ msgstr ""
msgid "join a channel"
msgstr ""
-msgid "[channel1[,channel2[,channel3]] [key1[,key2]]]"
+msgid "[-server server] [channel1[,channel2[,channel3]] [key1[,key2]]]"
msgstr ""
msgid ""
+" server: send to this server (internal name)\n"
"channel: channel name to join\n"
" key: key to join the channel (channels with a key must be the first in "
"list)\n"
"\n"
"Examples:\n"
" /join #weechat\n"
-" /join #protectedchan,#weechat key"
+" /join #protectedchan,#weechat key\n"
+" /join -server freenode #weechat"
msgstr ""
msgid "forcibly remove a user from a channel"
diff --git a/src/plugins/irc/irc-command.c b/src/plugins/irc/irc-command.c
index 6991022b1..5537b8d20 100644
--- a/src/plugins/irc/irc-command.c
+++ b/src/plugins/irc/irc-command.c
@@ -1757,15 +1757,26 @@ irc_command_ison (void *data, struct t_gui_buffer *buffer, int argc,
void
irc_command_join_server (struct t_irc_server *server, const char *arguments)
{
- if (irc_channel_is_channel (arguments))
+ if (server->sock < 0)
{
- irc_server_sendf (server, IRC_SERVER_SEND_OUTQ_PRIO_HIGH, NULL,
- "JOIN %s", arguments);
+ weechat_printf (NULL,
+ _("%s%s: command \"%s\" must be executed on "
+ "connected irc server"),
+ weechat_prefix ("error"), IRC_PLUGIN_NAME,
+ "join");
}
else
{
- irc_server_sendf (server, IRC_SERVER_SEND_OUTQ_PRIO_HIGH, NULL,
- "JOIN #%s", arguments);
+ if (irc_channel_is_channel (arguments))
+ {
+ irc_server_sendf (server, IRC_SERVER_SEND_OUTQ_PRIO_HIGH, NULL,
+ "JOIN %s", arguments);
+ }
+ else
+ {
+ irc_server_sendf (server, IRC_SERVER_SEND_OUTQ_PRIO_HIGH, NULL,
+ "JOIN #%s", arguments);
+ }
}
}
@@ -1778,14 +1789,26 @@ irc_command_join (void *data, struct t_gui_buffer *buffer, int argc,
char **argv, char **argv_eol)
{
IRC_BUFFER_GET_SERVER_CHANNEL(buffer);
- IRC_COMMAND_CHECK_SERVER("join", 1);
/* make C compiler happy */
(void) data;
- (void) argv;
if (argc > 1)
- irc_command_join_server (ptr_server, argv_eol[1]);
+ {
+ if ((argc >= 4) && (weechat_strcasecmp (argv[1], "-server") == 0))
+ {
+ ptr_server = irc_server_search (argv[2]);
+ if (!ptr_server)
+ return WEECHAT_RC_ERROR;
+ irc_command_join_server (ptr_server, argv_eol[3]);
+ }
+ else
+ {
+ if (!ptr_server)
+ return WEECHAT_RC_ERROR;
+ irc_command_join_server (ptr_server, argv_eol[1]);
+ }
+ }
else
{
if (ptr_channel && (ptr_channel->type == IRC_CHANNEL_TYPE_CHANNEL)
@@ -4771,14 +4794,17 @@ irc_command_init ()
"%(nicks)|%*", &irc_command_ison, NULL);
weechat_hook_command ("join",
N_("join a channel"),
- N_("[channel1[,channel2[,channel3]] [key1[,key2]]]"),
- N_("channel: channel name to join\n"
+ N_("[-server server] [channel1[,channel2[,channel3]] [key1[,key2]]]"),
+ N_(" server: send to this server (internal name)\n"
+ "channel: channel name to join\n"
" key: key to join the channel (channels with "
"a key must be the first in list)\n\n"
"Examples:\n"
" /join #weechat\n"
- " /join #protectedchan,#weechat key"),
- "%(irc_channels)", &irc_command_join, NULL);
+ " /join #protectedchan,#weechat key\n"
+ " /join -server freenode #weechat"),
+ "-server %(irc_servers)"
+ " || %(irc_channels)", &irc_command_join, NULL);
weechat_hook_command ("kick",
N_("forcibly remove a user from a channel"),
N_("[channel] nickname [comment]"),