From: Vincent Pit Date: Fri, 20 Nov 2015 13:26:15 +0000 (-0200) Subject: Freshen the default banner X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=dd329bf05f9a50bd10d79e522334761f9785d7ab;p=perl%2Fscripts%2Fxchat.git Freshen the default banner --- diff --git a/Xchat/XPI.pm b/Xchat/XPI.pm index 1d92364..6811e63 100644 --- a/Xchat/XPI.pm +++ b/Xchat/XPI.pm @@ -40,11 +40,11 @@ sub new { $opts{version} = $version; } unless (defined $opts{banner}) { - my $email = $opts{email}; - $email = "<$email>" if defined $email; - my $who = join ', ', grep defined, $opts{author}, $email, $opts{url}; + my $author = defined $opts{author} ? $opts{author} : 'unknown hacker'; + my $email = defined $opts{email} ? "<$opts{email}>" : undef; + my $who = join ', ', grep defined, $email, $opts{url}; $who = " ($who)" if length $who; - $opts{banner} = $opts{desc} . $who; + $opts{banner} = $opts{desc} . " by $author$who"; } my $ph = bless \do { local *PH }, $class;