From 48338128905aa80aa43efb619152a7801ed0d8c5 Mon Sep 17 00:00:00 2001 From: ElTata <eltata@firemail.cc> Date: Wed, 23 Oct 2019 11:48:58 +0200 Subject: [PATCH] internal - class function became getclass - admins command link on another line --- Irpg/Main.pm | 7 +------ Irpg/Users.pm | 6 +++--- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/Irpg/Main.pm b/Irpg/Main.pm index d94a92f..4090768 100644 --- a/Irpg/Main.pm +++ b/Irpg/Main.pm @@ -605,7 +605,7 @@ sub help { } if ($ctxt eq 'prv' && ha($usernick) && !exists($arg[0])) { - $ret .= "Admin commands URL is $opts->{admincommurl}"; + $ret .= "\nAdmin commands URL is $opts->{admincommurl}"; } Irpg::Irc::privmsg($ret, $source); } @@ -615,11 +615,6 @@ my ($k, $v); foreach (qw(Quest Action Event Admin Users)) { eval 'while (($k,$v) = each %$Irpg::'.$_.'::commands) {$commands{$k} = $v;}'; } -#while (($k,$v) = each %$Irpg::Quest::commands) {$commands{$k} = $v;} -#while (($k,$v) = each %$Irpg::Action::commands) {$commands{$k} = $v;} -#while (($k,$v) = each %$Irpg::Event::commands) {$commands{$k} = $v;} -#while (($k,$v) = each %$Irpg::Admin::commands) {$commands{$k} = $v;} -#while (($k,$v) = each %$Irpg::Users::commands) {$commands{$k} = $v;} undef $k; undef $v; diff --git a/Irpg/Users.pm b/Irpg/Users.pm index 4b7592c..aebe2cd 100644 --- a/Irpg/Users.pm +++ b/Irpg/Users.pm @@ -380,7 +380,7 @@ sub points { Irpg::Irc::privmsg("You sure feel more competent now!", $usernick); } -sub class { +sub getclass { my ($userhost, $usernick, $username, $source, @arg) = @_; if (!defined($username)) { Irpg::Irc::notice("You are not logged in.", $usernick); @@ -442,7 +442,7 @@ sub chclass { $rps->{$username}{class} = $new_class; Irpg::Main::penalize($username, 'chclass'); # show the new class - class($userhost,$usernick,$username,$source); + getclass($userhost,$usernick,$username,$source); Irpg::Irc::chanmsg("$username has trained hard following the ". "demanding path ".pronoun(1, $rps->{$username}{gender}). " has chosen, and ".pronoun(2, $rps->{$username}{gender}). @@ -506,7 +506,7 @@ our $commands = { 'or adds n points to your stat. '. 'stats are {str, con, wis, int, cha, dex}.'}, - class => {ref => \&class, adm => 0, prv => 1, pub => 1, + class => {ref => \&getclass, adm => 0, prv => 1, pub => 1, hlp => 'CLASS [<usernick>|<char name>]: gives the class info '. 'of a character, or of a usernick\'s character. '. 'Yours by default.'}, -- GitLab