mirror of
https://github.com/pragma-/pbot.git
synced 2024-11-23 04:19:27 +01:00
Improved display of timestamp in !info command
This commit is contained in:
parent
6e40033e92
commit
cffe7f6c4e
@ -318,29 +318,17 @@ sub info {
|
|||||||
|
|
||||||
# factoid
|
# factoid
|
||||||
if(exists $factoids->{$arguments}{text}) {
|
if(exists $factoids->{$arguments}{text}) {
|
||||||
my ($seconds, $minutes, $hours, $day_of_month, $month, $year, $wday, $yday, $isdst) =
|
return "$arguments: Factoid submitted by $factoids->{$arguments}{owner} on " . localtime($factoids->{$arguments}{timestamp}) . ", referenced $factoids->{$arguments}{ref_count} times (last by $factoids->{$arguments}{ref_user})";
|
||||||
localtime($factoids->{$arguments}{timestamp});
|
|
||||||
my $t = sprintf("%02d:%02d:%02d-%04d/%02d/%02d",
|
|
||||||
$hours, $minutes, $seconds, $year+1900, $month+1, $day_of_month);
|
|
||||||
return "$arguments: Factoid submitted by $factoids->{$arguments}{owner} on $t, referenced $factoids->{$arguments}{ref_count} times (last by $factoids->{$arguments}{ref_user})";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# module
|
# module
|
||||||
if(exists $factoids->{$arguments}{module}) {
|
if(exists $factoids->{$arguments}{module}) {
|
||||||
my ($seconds, $minutes, $hours, $day_of_month, $month, $year, $wday, $yday, $isdst) =
|
return "$arguments: Module loaded by $factoids->{$arguments}{owner} on " . localtime($factoids->{$arguments}{timestamp}) . " -> http://code.google.com/p/pbot2-pl/source/browse/trunk/modules/$factoids->{$arguments}{module}, used $factoids->{$arguments}{ref_count} times (last by $factoids->{$arguments}{ref_user})";
|
||||||
localtime($factoids->{$arguments}{timestamp});
|
|
||||||
my $t = sprintf("%02d:%02d:%02d-%04d/%02d/%02d",
|
|
||||||
$hours, $minutes, $seconds, $year+1900, $month+1, $day_of_month);
|
|
||||||
return "$arguments: Module loaded by $factoids->{$arguments}{owner} on $t -> http://code.google.com/p/pbot2-pl/source/browse/trunk/modules/$factoids->{$arguments}{module}, used $factoids->{$arguments}{ref_count} times (last by $factoids->{$arguments}{ref_user})";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# regex
|
# regex
|
||||||
if(exists $factoids->{$arguments}{regex}) {
|
if(exists $factoids->{$arguments}{regex}) {
|
||||||
my ($seconds, $minutes, $hours, $day_of_month, $month, $year, $wday, $yday, $isdst) =
|
return "$arguments: Regex created by $factoids->{$arguments}{owner} on " . localtime($factoids->{$arguments}{timestamp}) . ", used $factoids->{$arguments}{ref_count} times (last by $factoids->{$arguments}{ref_user})";
|
||||||
localtime($factoids->{$arguments}{timestamp});
|
|
||||||
my $t = sprintf("%02d:%02d:%02d-%04d/%02d/%02d",
|
|
||||||
$hours, $minutes, $seconds, $year+1900, $month+1, $day_of_month);
|
|
||||||
return "$arguments: Regex created by $factoids->{$arguments}{owner} on $t, used $factoids->{$arguments}{ref_count} times (last by $factoids->{$arguments}{ref_user})";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return "/msg $nick $arguments is not a factoid or a module";
|
return "/msg $nick $arguments is not a factoid or a module";
|
||||||
|
Loading…
Reference in New Issue
Block a user