summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2001-11-19 14:02:27 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2001-11-19 14:02:27 +0000
commit01404a3713654a65ee42fa3b2ce708d482ab8665 (patch)
tree33270277ab9568c610e429b2df19bc9587a54a7b /src/core
parent4978d4cd142fd3fa4f17daf9db2f95ef36791c4e (diff)
downloadirssi-01404a3713654a65ee42fa3b2ce708d482ab8665.zip
/CONNECT -! doesn't autojoin to channels.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2082 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/core')
-rw-r--r--src/core/channels.c3
-rw-r--r--src/core/chat-commands.c5
-rw-r--r--src/core/server-connect-rec.h1
3 files changed, 7 insertions, 2 deletions
diff --git a/src/core/channels.c b/src/core/channels.c
index 6add0b82..f0790c71 100644
--- a/src/core/channels.c
+++ b/src/core/channels.c
@@ -148,7 +148,8 @@ static void event_connected(SERVER_REC *server)
g_return_if_fail(SERVER(server));
- if (server->connrec->reconnection)
+ if (server->connrec->reconnection ||
+ server->connrec->no_autojoin_channels)
return;
/* get list of servers in same chat network */
diff --git a/src/core/chat-commands.c b/src/core/chat-commands.c
index 72ac41e4..285f2847 100644
--- a/src/core/chat-commands.c
+++ b/src/core/chat-commands.c
@@ -83,6 +83,9 @@ static SERVER_CONNECT_REC *get_server_connect(const char *data, int *plus_addr)
else if (g_hash_table_lookup(optlist, "4") != NULL)
conn->family = AF_INET;
+ if (g_hash_table_lookup(optlist, "!") != NULL)
+ conn->no_autojoin_channels = TRUE;
+
host = g_hash_table_lookup(optlist, "host");
if (host != NULL && *host != '\0') {
IPADDR ip4, ip6;
@@ -394,7 +397,7 @@ void chat_commands_init(void)
signal_add("default command server", (SIGNAL_FUNC) sig_default_command_server);
- command_set_options("connect", "4 6 +host");
+ command_set_options("connect", "4 6 !! +host");
command_set_options("join", "invite");
}
diff --git a/src/core/server-connect-rec.h b/src/core/server-connect-rec.h
index 4dcc5142..4aeba819 100644
--- a/src/core/server-connect-rec.h
+++ b/src/core/server-connect-rec.h
@@ -25,5 +25,6 @@ char *realname;
/* when reconnecting, the old server status */
unsigned int reconnection:1; /* we're trying to reconnect */
+unsigned int no_autojoin_channels:1; /* don't autojoin any channels */
char *channels;
char *away_reason;