From 88f78af5a15807dd86db4c7d475d5020c12e21b0 Mon Sep 17 00:00:00 2001 From: ElTata <eltata@firemail.cc> Date: Tue, 22 Oct 2019 14:34:20 +0200 Subject: [PATCH] stats in order in points/class --- Irpg/Users.pm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Irpg/Users.pm b/Irpg/Users.pm index cf8e5e5..4b7592c 100644 --- a/Irpg/Users.pm +++ b/Irpg/Users.pm @@ -357,7 +357,7 @@ sub points { if (!@arg) { Irpg::Irc::privmsg("Your raw competences are the following: ". join(', ', map { uc($_)." $rps->{$username}{stats}{$_}" } - keys($rps->{$username}{stats})).".", $source); + qw(str con int wis cha dex)).".", $source); return; } if (@arg != 2 || $arg[1] !~ m/^\d+$/) { @@ -396,10 +396,11 @@ sub class { } else { my $cname = $rps->{$asked}{class}->{NAME}; - Irpg::Irc::privmsg("You are a".($cname =~ m/^[AEIOUYƌ].*/ ? 'n':''). + my $who = $asked eq $username ? 'You are' : "$asked is"; + Irpg::Irc::privmsg("$who a".($cname =~ m/^[AEIOUYƌ].*/ ? 'n':''). " $cname with the following stats: ". join(', ', map { uc($_)." ".eval('$rps->{$asked}{class}->'.$_.'()') } - keys($rps->{$asked}{stats})).".", $source); + qw(str con int wis cha dex)).".", $source); return; } } -- GitLab