]> git.99rst.org Git - irssi-scripts.irssi.org.git/commitdiff
[usercount.pl] fix crash when server doesn't have isupport
authorAilin Nemui <redacted>
Tue, 21 Aug 2018 08:23:36 +0000 (10:23 +0200)
committerAilin Nemui <redacted>
Tue, 21 Aug 2018 08:23:36 +0000 (10:23 +0200)
scripts/usercount.pl

index 650f9f3656a507bcd2c3b5e8bbe3a015303375d8..7e765c9602038c4d06176fb0d6b04d112c154369 100644 (file)
@@ -1,7 +1,7 @@
 use strict;
 use Irssi 20040119.2359 ();
 use vars qw($VERSION %IRSSI);
-$VERSION = "1.19";
+$VERSION = "1.20";
 %IRSSI = (
     authors     => 'David Leadbeater, Timo Sirainen, Georg Lukas',
     contact     => 'dgl@dgl.cx, tss@iki.fi, georg@boerde.de',
@@ -128,7 +128,7 @@ sub calc_users() {
   }
 
   # Server doesn't support halfops? 
-  if($server->isupport("PREFIX") !~ /\%/) {
+  if($server->can('isupport') && $server->isupport("PREFIX") !~ /\%/) {
      $halfops = undef;
   } else {
      $halfops = undef unless Irssi::settings_get_bool('usercount_show_halfops');
git clone https://git.99rst.org/PROJECT