mirror of
https://github.com/irssi/irssi.git
synced 2024-12-04 14:46:39 -05:00
A bit more safer now to use /EVAL with a command that disconnects from
server.. Also added a FIXME: window item would need reference counting as well, eg. "/EVAL win close;say hello" wouldn't work now.. But that's probably job for the rewrite irssi. don't go use things like that :) git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2381 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
aa544dec32
commit
e8957938ea
@ -582,8 +582,19 @@ void eval_special_string(const char *cmd, const char *data,
|
|||||||
ret = g_strconcat(old, " ", data, NULL);
|
ret = g_strconcat(old, " ", data, NULL);
|
||||||
g_free(old);
|
g_free(old);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
server_ref(server);
|
||||||
signal_emit("send command", 3, ret, server, item);
|
signal_emit("send command", 3, ret, server, item);
|
||||||
|
|
||||||
|
if (!server_unref(server)) {
|
||||||
|
/* the server was destroyed */
|
||||||
|
server = NULL;
|
||||||
|
item = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* FIXME: window item would need reference counting as well,
|
||||||
|
eg. "/EVAL win close;say hello" wouldn't work now.. */
|
||||||
|
|
||||||
g_free(ret);
|
g_free(ret);
|
||||||
commands = g_slist_remove(commands, commands->data);
|
commands = g_slist_remove(commands, commands->data);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user