mirror of
https://github.com/irssi/irssi.git
synced 2024-12-04 14:46:39 -05:00
command_bind_first() and command_bind_last() didn't work properly.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2292 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
cffe29818d
commit
d723a5b64b
@ -265,7 +265,8 @@ static void perl_signal_add_to_int(const char *signal, SV *func,
|
|||||||
if (!command && strncmp(signal, "command ", 8) == 0) {
|
if (!command && strncmp(signal, "command ", 8) == 0) {
|
||||||
/* we used Irssi::signal_add() instead of
|
/* we used Irssi::signal_add() instead of
|
||||||
Irssi::command_bind() - oh well, allow this.. */
|
Irssi::command_bind() - oh well, allow this.. */
|
||||||
command_bind(signal+8, NULL, priority_get_func(priority));
|
command_bind_to(MODULE_NAME, priority, signal+8, -1,
|
||||||
|
NULL, priority_get_func(priority));
|
||||||
command = TRUE;
|
command = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -301,7 +302,7 @@ void perl_signal_add_to(const char *signal, SV *func, int priority)
|
|||||||
static void perl_signal_destroy(PERL_SIGNAL_REC *rec)
|
static void perl_signal_destroy(PERL_SIGNAL_REC *rec)
|
||||||
{
|
{
|
||||||
if (strncmp(rec->signal, "command ", 8) == 0)
|
if (strncmp(rec->signal, "command ", 8) == 0)
|
||||||
command_unbind(rec->signal+8, sig_func_default);
|
command_unbind(rec->signal+8, perl_signal_get_func(rec));
|
||||||
|
|
||||||
SvREFCNT_dec(rec->func);
|
SvREFCNT_dec(rec->func);
|
||||||
g_free(rec->signal);
|
g_free(rec->signal);
|
||||||
@ -368,7 +369,8 @@ void perl_command_bind_to(const char *cmd, const char *category,
|
|||||||
{
|
{
|
||||||
char *signal;
|
char *signal;
|
||||||
|
|
||||||
command_bind(cmd, category, priority_get_func(priority));
|
command_bind_to(MODULE_NAME, priority, cmd, -1,
|
||||||
|
category, priority_get_func(priority));
|
||||||
|
|
||||||
signal = g_strconcat("command ", cmd, NULL);
|
signal = g_strconcat("command ", cmd, NULL);
|
||||||
perl_signal_add_to_int(signal, func, priority, TRUE);
|
perl_signal_add_to_int(signal, func, priority, TRUE);
|
||||||
|
Loading…
Reference in New Issue
Block a user