--- nickserv.pl	Wed Sep 17 23:14:44 2003
+++ scripts/nickserv.pl	Wed Jul 28 13:05:00 2004
@@ -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}));
         }
     }
 }


syntax highlighted by Code2HTML, v. 0.9.1