diff options
author | Jilles Tjoelker <jilles@irssi.org> | 2009-02-27 14:32:33 +0000 |
---|---|---|
committer | jilles <jilles@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2009-02-27 14:32:33 +0000 |
commit | c57f58dea5dbbd9b5b1e8861d9a37dfa1c62b98a (patch) | |
tree | 7562fcf61d481c744ff34d19fb3082794096f9e7 /src/core/chat-commands.c | |
parent | d979a991c8306b74838062a2f87547ea22dc298f (diff) | |
download | irssi-c57f58dea5dbbd9b5b1e8861d9a37dfa1c62b98a.zip |
Move to a single /join function, avoiding confusion on "/join -window".
patch by exg
bug #644, thanks for the useful bug report
git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@5023 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/core/chat-commands.c')
-rw-r--r-- | src/core/chat-commands.c | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/src/core/chat-commands.c b/src/core/chat-commands.c index 3b8b5df8..0f796324 100644 --- a/src/core/chat-commands.c +++ b/src/core/chat-commands.c @@ -314,37 +314,6 @@ static void cmd_quit(const char *data) signal_emit("gui exit", 0); } -/* SYNTAX: JOIN [-window] [-invite] [-<server tag>] <channels> [<keys>] */ -static void cmd_join(const char *data, SERVER_REC *server) -{ - GHashTable *optlist; - char *channels; - void *free_arg; - - g_return_if_fail(data != NULL); - - if (!cmd_get_params(data, &free_arg, 1 | PARAM_FLAG_OPTIONS | - PARAM_FLAG_UNKNOWN_OPTIONS | PARAM_FLAG_GETREST, - "join", &optlist, &channels)) - return; - - /* -<server tag> */ - server = cmd_options_get_server("join", optlist, server); - if (server == NULL || !server->connected) - cmd_param_error(CMDERR_NOT_CONNECTED); - - if (g_hash_table_lookup(optlist, "invite")) - channels = server->last_invite; - else { - if (*channels == '\0') - cmd_param_error(CMDERR_NOT_ENOUGH_PARAMS); - } - - if (channels != NULL) - server->channels_join(server, channels, FALSE); - cmd_params_free(free_arg); -} - /* SYNTAX: MSG [-<server tag>] [-channel | -nick] <targets> <message> */ static void cmd_msg(const char *data, SERVER_REC *server, WI_ITEM_REC *item) { @@ -475,7 +444,6 @@ void chat_commands_init(void) command_bind("connect", NULL, (SIGNAL_FUNC) cmd_connect); command_bind("disconnect", NULL, (SIGNAL_FUNC) cmd_disconnect); command_bind("quit", NULL, (SIGNAL_FUNC) cmd_quit); - command_bind("join", NULL, (SIGNAL_FUNC) cmd_join); command_bind("msg", NULL, (SIGNAL_FUNC) cmd_msg); command_bind("foreach", NULL, (SIGNAL_FUNC) cmd_foreach); command_bind("foreach server", NULL, (SIGNAL_FUNC) cmd_foreach_server); @@ -486,7 +454,6 @@ void chat_commands_init(void) signal_add("server sendmsg", (SIGNAL_FUNC) sig_server_sendmsg); command_set_options("connect", "4 6 !! -network ssl +ssl_cert +ssl_pkey ssl_verify +ssl_cafile +ssl_capath +host noproxy -rawlog"); - command_set_options("join", "invite"); command_set_options("msg", "channel nick"); } @@ -497,7 +464,6 @@ void chat_commands_deinit(void) command_unbind("connect", (SIGNAL_FUNC) cmd_connect); command_unbind("disconnect", (SIGNAL_FUNC) cmd_disconnect); command_unbind("quit", (SIGNAL_FUNC) cmd_quit); - command_unbind("join", (SIGNAL_FUNC) cmd_join); command_unbind("msg", (SIGNAL_FUNC) cmd_msg); command_unbind("foreach", (SIGNAL_FUNC) cmd_foreach); command_unbind("foreach server", (SIGNAL_FUNC) cmd_foreach_server); |