summaryrefslogtreecommitdiff
path: root/lib/Multi/IRC.pm
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2010-12-05 11:38:12 +0100
committerYorhel <git@yorhel.nl>2010-12-05 11:38:12 +0100
commit0f49a06b76e88f07f79b3623d6bd177892b91d72 (patch)
tree6ebbfab73f5917ddef8f0dd38c46539e2603bb22 /lib/Multi/IRC.pm
parent5f84950274d625b01ee1211f2f8a99ddbb5e7cbc (diff)
API: Allow the API to be used without logging in with a username/password
It only served to scare potential developers away.
Diffstat (limited to 'lib/Multi/IRC.pm')
-rw-r--r--lib/Multi/IRC.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Multi/IRC.pm b/lib/Multi/IRC.pm
index bce8f934..75b4f7c4 100644
--- a/lib/Multi/IRC.pm
+++ b/lib/Multi/IRC.pm
@@ -498,7 +498,7 @@ sub cmd_api {
my $lst = $_[KERNEL]->call(api => admin => 'list');
return $_[KERNEL]->yield(reply => $_[DEST], 'Nobody connected.') if !@$lst;
$_[KERNEL]->yield(reply => $_[DEST], sprintf '%3d %15s %s%s', $_->{id}, $_->{ip}, age(time-$_->{connected}),
- !$_->{username} ? '' : sprintf ' - %s (%s %s) C/E: %d/%d T: %.2f/%.2f', $_->{username},
+ !$_->{client} ? '' : sprintf ' - %s (%s %s) C/E: %d/%d T: %.2f/%.2f', ($_->{username}||'-'),
$_->{client}, $_->{clientver}, $_->{cmds}, $_->{cmd_err}, $_->{t_cmd}, $_->{t_sql})
for (sort { $a->{ip} cmp $b->{ip} } @$lst);
}