From: Vincent Pit Date: Sat, 14 Aug 2010 22:50:11 +0000 (+0200) Subject: Style nits X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=3bde6e3a4f228bb731c1719f7096a8474cfab82d;p=perl%2Fscripts%2Fxchat.git Style nits --- diff --git a/clones.pl b/clones.pl index 421bbd4..d47b027 100755 --- a/clones.pl +++ b/clones.pl @@ -51,11 +51,11 @@ sub host { sub add { my ($nick, $host, $serv, $chan) = @_; my $hosts = $users{$serv}{$chan}; - $users{$serv}{$chan} = $hosts = { } if not defined $hosts; + $users{$serv}{$chan} = $hosts = { } unless defined $hosts; my $clones = $hosts->{$host}; $nick = PRE . $nick . POST; if (defined $clones) { - if ((index $clones, $nick) < $[) { + if (index($clones, $nick) < $[) { $hosts->{$host} = dualvar int($clones) + 1, $clones . $nick; } } else { @@ -231,7 +231,7 @@ hook_print 'Disconnected', sub { my %servers = map { $_->{server} => 1 } grep { $_->{flags} & 9 && not $_->{flags} & 2 } get_list 'channels'; - delete $users{$_} for grep { !$servers{$_} } keys %users; + delete $users{$_} for grep { !$servers{$_} } keys %users; delete $fetched{$_} for grep { !$servers{$_} } keys %fetched; return EAT_NONE; }; @@ -255,7 +255,8 @@ sub nick_cb { hook_print $_, \&nick_cb for ('Change Nick', 'Your Nick Changing'); hook_command 'CLSCAN', sub { - my ($serv, $chan) = (get_info('server'), lc get_info('channel')); + my $serv = get_info 'server'; + my $chan = lc get_info 'channel'; if (!$fetched{$serv}{$chan} && !fetch($serv, $chan)) { print $ph "Data still not available\n"; } elsif (!scan($serv, $chan)) {