--- /usr/share/irssi/scripts/nickserv.pl Wed Sep 17 23:14:44 2003 +++ ./nickserv.pl Wed Jul 28 13:05:00 2004 @@ -24,7 +24,7 @@ use Irssi; use vars qw($VERSION %IRSSI); -$VERSION = "1.5"; +$VERSION = "1.5.1"; %IRSSI = ( authors => 'Geert Hauwaerts', @@ -33,7 +33,7 @@ description => 'This script will authorize you into NickServ.', license => 'GNU General Public License', url => 'http://irssi.hauwaerts.be/nickserv.pl', - changed => 'Wed Sep 17 23:00:11 CEST 2003', + changed => 'Wed Jul 28 12:13:43 CEST 2004', ); my @nickservnet = (); @@ -59,7 +59,7 @@ delnick: Delete a nickname from the NickServ list. listnet: Display the contents of the NickServ network list. listnick: Display the contents of the NickServ nickname list. -help: Display this usefull little helpfile. +help: Display this useful little helptext. Examples: (all on one line) /NICKSERV addnet Freenode NickServ\@services. @@ -123,9 +123,6 @@ } close(F); - } else { - create_network_file($file); - save_nickservnet($file); } } @@ -133,6 +130,8 @@ my ($file) = @_; + return unless scalar @nickservnet; # there's nothing to save + if (-e $file) { local *F; open(F, ">$file"); @@ -186,9 +185,6 @@ } close(F); - } else { - create_nick_file($file); - save_nickservnick($file); } } @@ -196,6 +192,8 @@ my ($file) = @_; + return unless scalar @nickservauth; # there's nothing to save + if (-e $file) { local *F; open(F, ">$file"); @@ -215,7 +213,9 @@ my ($file) = @_; + my $umask = umask 0077; # save old umask open(F, ">$file") or die "Can't create $file. Reason: $!"; + umask $umask; } sub new_nickserv_nick { @@ -378,7 +378,7 @@ Irssi::printformat(MSGLEVEL_CLIENTCRAP, 'nickname_info'); for (my $n = 0; $n < @nickservauth ; ++$n) { - Irssi::printformat(MSGLEVEL_CLIENTCRAP, 'nickname_print', $n, $nickservauth[$n]->{ircnet}, $nickservauth[$n]->{nick}, $nickservauth[$n]->{pass}); + Irssi::printformat(MSGLEVEL_CLIENTCRAP, 'nickname_print', $n, $nickservauth[$n]->{ircnet}, $nickservauth[$n]->{nick}, "*" x length($nickservauth[$n]->{pass})); } } }