From c57f58dea5dbbd9b5b1e8861d9a37dfa1c62b98a Mon Sep 17 00:00:00 2001 From: Jilles Tjoelker Date: Fri, 27 Feb 2009 14:32:33 +0000 Subject: 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 --- src/core/chat-commands.c | 34 ---------------------------------- 1 file changed, 34 deletions(-) (limited to 'src/core/chat-commands.c') 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] [-] [] */ -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 = 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 [-] [-channel | -nick] */ 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); -- cgit v1.2.3