Moved CTCP VERSION reply.
This commit is contained in:
1 parent
ad0c24cc5d
commit
3df0eced7b
3 files changed
+19
-20
No files matched your search
@@ -37,6 +37,7 @@ use DB::Flatfile;
|
||||
use Parser::Config;
|
||||
use Parser::Lang;
|
||||
use Parser::IRC;
|
||||
use Core::IRC;
|
||||
use Core::Cmd;
|
||||
|
||||
our $VERSION = 3.0.0;
|
||||
@@ -348,8 +349,6 @@ else {
|
||||
}
|
||||
undef $it;
|
||||
|
||||
# Create core hooks.
|
||||
API::Std::hook_add('on_uprivmsg', 'ctcp_version_reply', \&Core::Cmd::version_reply);
|
||||
# Create core commands.
|
||||
API::Std::cmd_add('MODLOAD', 1, 'cfunc.modules', \%Core::Cmd::HELP_MODLOAD, \&Core::Cmd::cmd_modload);
|
||||
API::Std::cmd_add('MODUNLOAD', 1, 'cfunc.modules', \%Core::Cmd::HELP_MODUNLOAD, \&Core::Cmd::cmd_modunload);
|
||||
|
||||
@@ -11,24 +11,6 @@ use API::Std qw(trans has_priv match_user);
|
||||
use API::Log qw(dbug alog);
|
||||
use API::IRC qw(notice quit usrc);
|
||||
|
||||
sub version_reply
|
||||
{
|
||||
my (($svr, @ex)) = @_;
|
||||
my %src = usrc(substr($ex[0], 1));
|
||||
|
||||
if ($ex[3] eq ":\001VERSION\001") {
|
||||
if (Auto::RSTAGE ne 'd') {
|
||||
notice($svr, $src{nick}, "VERSION ".Auto::NAME." ".Auto::VER.".".Auto::SVER.".".Auto::REV.Auto::RSTAGE." ".$OSNAME);
|
||||
}
|
||||
else {
|
||||
notice($svr, $src{nick}, "VERSION ".Auto::NAME." ".Auto::VER.".".Auto::SVER.".".Auto::REV.Auto::RSTAGE."-".Auto::GR." ".$OSNAME);
|
||||
}
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
# Help hash for MODLOAD. Spanish, French and German needed.
|
||||
our %HELP_MODLOAD = (
|
||||
'en' => 'Loads a module into the running Auto live.',
|
||||
|
||||
@@ -8,3 +8,21 @@ use strict;
|
||||
use warnings;
|
||||
use API::Std qw(hook_add hook_del);
|
||||
our $VERSION = 3.000000;
|
||||
|
||||
# CTCP VERSION reply.
|
||||
sub version_reply
|
||||
{
|
||||
my (($svr, @ex)) = @_;
|
||||
my %src = usrc(substr($ex[0], 1));
|
||||
|
||||
if ($ex[3] eq ":\001VERSION\001") {
|
||||
if (Auto::RSTAGE ne 'd') {
|
||||
notice($svr, $src{nick}, "\001VERSION ".Auto::NAME." ".Auto::VER.".".Auto::SVER.".".Auto::REV.Auto::RSTAGE." ".$OSNAME."\001");
|
||||
}
|
||||
else {
|
||||
notice($svr, $src{nick}, "\001VERSION ".Auto::NAME." ".Auto::VER.".".Auto::SVER.".".Auto::REV.Auto::RSTAGE."-".Auto::GR." ".$OSNAME."\001");
|
||||
}
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
Reference in new issue
Block a user