summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2001-12-07 22:18:39 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2001-12-07 22:18:39 +0000
commit0f29e57c14f48eb35bbce16fdab217ba54667463 (patch)
treee3a98fd7acfdacd983d4336b2b29fe16e10a1288 /src
parenta09075938fc9fce04805b291426e4ae635a6cc87 (diff)
downloadirssi-0f29e57c14f48eb35bbce16fdab217ba54667463.zip
Removed Irssi::require_version(), we'll use "use Irssi 20011207;" style now.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2217 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src')
-rw-r--r--src/perl/common/Core.xs7
-rw-r--r--src/perl/common/Irssi.pm6
2 files changed, 6 insertions, 7 deletions
diff --git a/src/perl/common/Core.xs b/src/perl/common/Core.xs
index d1bcb67b..723533d7 100644
--- a/src/perl/common/Core.xs
+++ b/src/perl/common/Core.xs
@@ -436,13 +436,6 @@ CODE:
OUTPUT:
RETVAL
-void
-require_version(date)
- int date
-CODE:
- if (date > atol(IRSSI_VERSION_DATE))
- die("This script requires irssi version %d or later", date);
-
#*******************************
MODULE = Irssi::Core PACKAGE = Irssi::Server
#*******************************
diff --git a/src/perl/common/Irssi.pm b/src/perl/common/Irssi.pm
index d571be4b..56c23f75 100644
--- a/src/perl/common/Irssi.pm
+++ b/src/perl/common/Irssi.pm
@@ -7,6 +7,12 @@ package Irssi;
use strict;
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK);
+sub VERSION {
+ my $version = $_[1];
+ die "This script requires irssi version $version or later"
+ if ($version > version());
+}
+
$VERSION = "0.9";
require Exporter;