unless (!module::is_loaded('services')) {
open (SSNICKFILE, main::PREFIX()."/config/spamserv/nicklist.txt");
my ($nick, $ident, $hostmask) = ('','','');
- my @aznum = ('a'..'z','0'..'9');
my @hexset = ('A'..'F','0'..'9');
srand;
rand($.) < 1 and ($nick=$_) while <SSNICKFILE>;
chomp $nick;
close SSNICKFILE;
if (!nickserv::is_registered($nick) && !nickserv::is_online($nick)) {
- $ident = "htIRC-";
- for (my $i = 1;$i <= 5;$i++) { $ident .= $aznum[rand @aznum]; }
+ $ident = "htIRC-".lc(misc::gen_uuid(1,4));
for (my $i = 1;$i <= 3;$i++) {
for (my $x = 1;$x <= 8;$x++) {
$hostmask .= $hexset[rand @hexset];
}
$hostmask .= ".";
}
-
$hostmask .= "IP";
$fakehost = $nick."!".$ident."@".$hostmask;
$idlelength = int(rand($conf{'idlemax'} - $conf{'idlemin'})) + $conf{'idlemin'};
- add_timer($fakehost, $idlelength , __PACKAGE__, 'spamserv::ss_respawn');
+ add_timer($fakehost, $idlelength, __PACKAGE__, 'spamserv::ss_respawn');
join_chans();
}
else {
- ss_newclient();
+ add_timer('', 30, __PACKAGE__, 'spamserv::ss_newclient');
}
}
}