From d723a5b64b3648ef223829b5223217d5ebc519b2 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Thu, 3 Jan 2002 23:25:18 +0000 Subject: [PATCH] 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 --- src/perl/perl-signals.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/perl/perl-signals.c b/src/perl/perl-signals.c index 8df488cd..97d3828e 100644 --- a/src/perl/perl-signals.c +++ b/src/perl/perl-signals.c @@ -265,7 +265,8 @@ static void perl_signal_add_to_int(const char *signal, SV *func, if (!command && strncmp(signal, "command ", 8) == 0) { /* we used Irssi::signal_add() instead of 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; } @@ -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) { 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); g_free(rec->signal); @@ -368,7 +369,8 @@ void perl_command_bind_to(const char *cmd, const char *category, { 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); perl_signal_add_to_int(signal, func, priority, TRUE);