1
0
mirror of https://github.com/irssi/irssi.git synced 2025-02-02 15:08:01 -05:00

When commands were being parsed, the currectly active server should have been referenced, but the code was accidentally in subcommand parser not in the main one.. Also, the connection_lost wasn't checked after parsing the command and might have caused a glib error.

git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2307 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2002-01-11 05:47:52 +00:00 committed by cras
parent 02f0574506
commit 6d44620b4a

View File

@ -313,7 +313,6 @@ void command_runsub(const char *cmd, const char *data,
subcmd = g_strconcat("command ", newcmd, NULL);
g_strdown(subcmd);
if (server != NULL) server_ref(server);
if (!signal_emit(subcmd, 3, args, server, item)) {
defcmd = g_strdup_printf("default command %s", cmd);
if (!signal_emit(defcmd, 3, data, server, item)) {
@ -322,7 +321,6 @@ void command_runsub(const char *cmd, const char *data,
}
g_free(defcmd);
}
if (server != NULL) server_unref(server);
g_free(subcmd);
g_free(orig);
@ -860,10 +858,12 @@ static void parse_command(const char *command, int expand_aliases,
oldcmd = current_command;
current_command = cmd+8;
if (!signal_emit(cmd, 3, args, server, item)) {
if (server != NULL) server_ref(server);
if (!signal_emit(cmd, 3, args, server, item)) {
signal_emit_id(signal_default_command, 3,
command, server, item);
}
if (server != NULL) server_unref(server);
current_command = oldcmd;
g_free(cmd);