Subject: | Plugin::ISupport returning incorrect PREFIXes |
Some IRC servers seem to be issuing their PREFIX support as "@+" instead
of "(ov)@+". This breaks the regex in ISupport.pm on line 91.
This then causes $irc->isupport('PREFIX') to return a malformed hash in
PoCo-IRC-STate and in some cases, causes Perl to die.
Simple fix so far seems to be changing ISupport.pm:
--- ISupport.pm 2006-08-18 13:31:38.000000000 +0930
+++ ISupport.new 2006-08-18 13:29:35.000000000 +0930
@@ -88,8 +88,9 @@
}
}
elsif ($key eq 'PREFIX') {
- my ($k, $v) = $val =~ /\(([^)]+)\)(.*)/;
- @{ $support->{$key} }{split //, $k} = split //, $v;
+ if ( my ($k, $v) = $val =~ /\(([^)]+)\)(.*)/ ){
+ @{ $support->{$key} }{split //, $k} = split //, $v;
+ }
}
elsif ($key eq 'SILENCE') {
$support->{$key} = length($val) ? $val : 'off';