Added Core::IRC, a CTCP version reply and fixed the NAME,VER,SVER,REV,RSTAGE constants.

This commit is contained in:
Elijah Perrault committed 2011-02-01 19:08:59 -07:00
1 parent 4b4f805c8f
commit 4dd3dbd09b
3 files changed
+45 -11

No files matched your search

+25
View File
@@ -0,0 +1,25 @@
# Auto IRC Bot. An advanced, lightweight and powerful IRC bot.
# Copyright (C) 2010-2011 Xelhua Development Team (doc/CREDITS)
# This program is free software; rights to this code are stated in doc/LICENSE.
# Core IRC functionality.
package Core::IRC;
use strict;
use warnings;
use English;
use API::IRC qw(notice usrc);
sub version_reply
{
my (($svr, @ex)) = @_;
my %src = usrc(substr($ex[0], 1));
if ($ex[3] eq ":\001VERSION\001") {
notice($svr, $src{nick}, "VERSION ".Auto::NAME." ".Auto::VER.".".Auto::SVER.".".Auto::REV.Auto::RSTAGE." ".$OSNAME);
}
return 1;
}
1;