From c4bfd869dc4a293509f13f7cb11db54ff410a8b6 Mon Sep 17 00:00:00 2001 From: fruitiex Date: Sun, 3 Jan 2010 19:54:57 +0000 Subject: [PATCH] joinsparts.pl plugin update by merlijn git-svn-id: svn://svn.icculus.org/nexuiz/trunk@8473 f962a42d-fe04-0410-a3ab-8c8b0445ebaa --- server/rcon2irc/joinsparts.pl | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/server/rcon2irc/joinsparts.pl b/server/rcon2irc/joinsparts.pl index e842f5f19..ce0e96ee2 100644 --- a/server/rcon2irc/joinsparts.pl +++ b/server/rcon2irc/joinsparts.pl @@ -14,10 +14,12 @@ # current code has been tested against version 0.8 of the Geo::IPfree module # You can obtain a copy here: http://search.cpan.org/~bricas/Geo-IPfree-0.8/lib/Geo/IPfree.pm # Place the 'Geo' dir in the same directory as this plugin or anywhere in @INC. -if ($pj{irc_show_country}) { - use Geo::IPfree; - $pj{geo} = Geo::IPfree->new; - $pj{geo}->Faster; # Due to a relatively large amount of lookups, this is probably a good idea +if ($pj{irc_show_country}) { + eval { + require Geo::IPfree; + $pj{geo} = Geo::IPfree->new; + $pj{geo}->Faster; # Due to a relatively large amount of lookups, this is probably a good idea + } or die "joinsparts.pl: requested countrynames, but can't load data, $@"; } $store{plugin_joinsparts} = \%pj; } -- 2.39.2