sub STORE {
my ($self, $key, $value) = @_;
- print "Store \%" . $$self . "\n" if SrSv::Shared::DEBUG;
+# print "Store \%" . $$self . "\n" if SrSv::Shared::DEBUG;
return ${$$self}{$key} = $value;
}
sub FETCH {
my ($self, $key) = @_;
- print "Fetch \%" . $$self . "\n" if SrSv::Shared::DEBUG;
+# print "Fetch \%" . $$self . "\n" if SrSv::Shared::DEBUG;
return ${$$self}{$key};
}
sub DELETE {
my ($self, $key) = @_;
+ print "DELETE \%" . $$self . "{$key}\n" if SrSv::Shared::DEBUG;
return delete(${$$self}{$key});
}
sub CLEAR {
my ($self) = @_;
-
+ print "CLEAR \%" . $$self . "\n" if SrSv::Shared::DEBUG;
+=cut
+ foreach my $key (keys %{$$self}) {
+ delete ($$self->{$key});
+ }
return %{$$self} = ();
+=cut
+ $$self = {};
+ return %{$$self};
}
sub EXISTS {
}
sub start_timers2 {
- update_tor_list_timed(3540) if $conf{'EnableTor'};
+ update_tor_list_timed(3540) if $enabletor;
#securitybot::ss2tkl::update_ss_timed(3300) if $conf{'EnableSS'};
};
add_timer('', $time, __PACKAGE__, 'securitybot::update_tor_list_timed');
- update_tor_list();
+ update_tor_list() if $enabletor;
}
sub update_tor_list() {