1
0
mirror of https://github.com/irssi/irssi.git synced 2024-06-23 06:35:36 +00:00

Added /CLONES script

git-svn-id: http://svn.irssi.org/repos/irssi/trunk@776 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2000-10-19 19:41:05 +00:00 committed by cras
parent a712a5c11a
commit a7c364addb
2 changed files with 27 additions and 0 deletions

View File

@ -1,6 +1,7 @@
EXTRA_DIST = \
autoop.pl \
autorejoin.pl \
clones.pl \
hello.pl \
privmsg.pl \
realname.pl \

26
scripts/clones.pl Normal file
View File

@ -0,0 +1,26 @@
# /CLONES - display real name of nick
use Irssi;
use Irssi::Irc;
sub cmd_clones {
my ($data, $server, $channel) = @_;
my %hostnames, $host, @nicks, $nick;
@nicks = $channel->nicklist_getnicks();
foreach $nick (@nicks) {
$hostnames{$nick->values()->{'host'}}++;
}
$channel->print("Clones:");
foreach $host (keys %hostnames) {
my $clones = $hostnames{$host};
if ($clones >= 2) {
$channel->print("$host: $clones");
}
}
return 1;
}
Irssi::command_bind('clones', '', 'cmd_clones');