I've managed to get Irssi to segfault consistently, although I'm not 100% sure
what's causing it.  Here's the script I'm running:

------cut------
# Test binding signals for away messages

sub print_away_message {
        my ($data, $server, $winitem) = @_;

        @chans = $server->channels();

        for ($i=0; $i <= $#chans; $i++) {
                $cname = $chans[$i]->{name};
                if ($data ne "") {
                        $server->command("/ACTION $cname is away; [^B$data^O]");
                } else {
                        $server->command("/ACTION $cname is back.");
                }
        }
}
 
Irssi::signal_add("command away", "print_away_message");
------cut------

The first time I run the script, it's fine.
However, if I /run the script a second time, irssi segfaults.
I tried adding another Irssi::signal_add line to the bottom so it looked like this:
Irssi::signal_add("command away", "print_away_message");
Irssi::signal_add("command away", "print_away_message");

but it didn't segfault when I loaded it the first time.  Segfaulted the second time, 
though.

Also, whenever this script is loaded, and I /quit, Irssi segfaults upon quitting 
instead of
gracefully closing connection.  Irssi doesn't do this if I don't load this script.

This is on irssi v0.7.98.3 - running on Linux

-- 
Spirilis

GnuPG Public Key available from certserver.pgp.com
Key ID 92E1516E
GPG Fingerprint: BA2A E8C0 D4BA 604A 997D  F809 D609 C9AC 92E1 516E

Reply via email to