From: Ailin Nemui Date: Tue, 21 Aug 2018 08:23:36 +0000 (+0200) Subject: [usercount.pl] fix crash when server doesn't have isupport X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=c02d8af838e2516c7e87f6d1e612dff1ebf0693a;p=irssi-scripts.irssi.org.git [usercount.pl] fix crash when server doesn't have isupport --- diff --git a/scripts/usercount.pl b/scripts/usercount.pl index 650f9f3..7e765c9 100644 --- a/scripts/usercount.pl +++ b/scripts/usercount.pl @@ -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');