mirror of
https://github.com/pragma-/pbot.git
synced 2024-12-23 19:22:40 +01:00
Prettier export headers; factrem output for not owner now includes channel
This commit is contained in:
parent
380a2b322c
commit
d7f2583aac
@ -309,12 +309,13 @@ sub factrem {
|
||||
|
||||
if(($nick ne $factoids->{$channel}->{$trigger}->{owner}) and (not $self->{pbot}->admins->loggedin($from, "$nick!$user\@$host"))) {
|
||||
$self->{pbot}->logger->log("$nick!$user\@$host attempted to remove $trigger [not owner]\n");
|
||||
return "/msg $nick You are not the owner of '$trigger'";
|
||||
my $chan = ($channel eq '.*' ? 'the global channel' : $channel);
|
||||
return "/msg $nick You are not the owner of '$trigger' for $chan";
|
||||
}
|
||||
|
||||
$self->{pbot}->logger->log("$nick!$user\@$host removed [$channel][$trigger][" . $factoids->{$channel}->{$trigger}->{action} . "]\n");
|
||||
$self->{pbot}->factoids->remove_factoid($channel, $trigger);
|
||||
return "/msg $nick $trigger removed from " . ($channel eq '.*' ? 'global channel' : $channel) . ".";
|
||||
return "/msg $nick $trigger removed from " . ($channel eq '.*' ? 'the global channel' : $channel) . ".";
|
||||
}
|
||||
|
||||
sub histogram {
|
||||
|
@ -121,13 +121,13 @@ sub export_factoids {
|
||||
|
||||
my $time = localtime;
|
||||
print FILE "<html><body><i>Last updated at $time</i>\n";
|
||||
print FILE "<hr><h3>Candide's factoids:</h3><br>\n";
|
||||
print FILE "<hr><h2>Candide's factoids</h2>\n";
|
||||
|
||||
my $i = 0;
|
||||
|
||||
foreach my $channel (sort keys %{ $self->factoids->hash }) {
|
||||
my $chan = $channel eq '.*' ? 'Global channel' : "Channel $channel";
|
||||
print FILE "<hr>\n$chan\n<hr>\n";
|
||||
print FILE "<hr>\n<h3>$chan<h3>\n<hr>\n";
|
||||
print FILE "<table border=\"0\">\n";
|
||||
foreach my $trigger (sort keys %{ $self->factoids->hash->{$channel} }) {
|
||||
if($self->factoids->hash->{$channel}->{$trigger}->{type} eq 'text') {
|
||||
|
@ -13,8 +13,8 @@ use warnings;
|
||||
# These are set automatically by the build/commit script
|
||||
use constant {
|
||||
BUILD_NAME => "PBot",
|
||||
BUILD_REVISION => 214,
|
||||
BUILD_DATE => "2010-06-28",
|
||||
BUILD_REVISION => 215,
|
||||
BUILD_DATE => "2010-06-29",
|
||||
};
|
||||
|
||||
1;
|
||||
|
Loading…
Reference in New Issue
Block a user