mirror of
https://github.com/irssi/irssi.git
synced 2024-11-03 04:27:19 -05:00
69a6096b8b
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1639 dbcabf3a-b0e7-0310-adc4-f8d773084564
26 lines
462 B
Perl
26 lines
462 B
Perl
# /CLONES - display real name of nick
|
|
|
|
use Irssi;
|
|
use strict;
|
|
|
|
sub cmd_clones {
|
|
my ($data, $server, $channel) = @_;
|
|
my (%hostnames, $host, @nicks, $nick);
|
|
|
|
@nicks = $channel->nicks();
|
|
|
|
foreach $nick (@nicks) {
|
|
$hostnames{$nick->{host}}++;
|
|
}
|
|
|
|
$channel->print("Clones:");
|
|
foreach $host (keys %hostnames) {
|
|
my $clones = $hostnames{$host};
|
|
if ($clones >= 2) {
|
|
$channel->print("$host: $clones");
|
|
}
|
|
}
|
|
}
|
|
|
|
Irssi::command_bind('clones', 'cmd_clones');
|