]> git.vpit.fr Git - perl/scripts/xchat.git/blobdiff - clones.pl
Tweak host()
[perl/scripts/xchat.git] / clones.pl
index c735c884a45c1ad388c65b06fe388e2ee60f9d52..12150e80dda752f97de46a4cf8158e5aa14a25e8 100755 (executable)
--- a/clones.pl
+++ b/clones.pl
@@ -45,8 +45,7 @@ sub clone_list_str {
 
 sub host {
  my $userhost = lc $_[0];
- my ($host) = $userhost =~ /@([^@]+)$/;
- return $host || $userhost;
+ return $userhost =~ /@([^@]+)$/ ? $1 : $userhost;
 }
 
 sub add {