X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=src%2FIRC%2FIrcHooks.pl;h=b1010b9565712a9cf9ea3831ac3c0becec7716dc;hb=f157fbbfa81c71c2e68ed701bf18638e247d938c;hp=facce2956494632472da5795192316ac62195f14;hpb=57f0d44ed01cc16fca2012ab4a9fd678631a2db4;p=infobot.git diff --git a/src/IRC/IrcHooks.pl b/src/IRC/IrcHooks.pl index facce29..b1010b9 100644 --- a/src/IRC/IrcHooks.pl +++ b/src/IRC/IrcHooks.pl @@ -356,7 +356,7 @@ sub on_endofnames { # sync time should be done in on_endofwho like in BitchX if (exists $cache{jointime}{$chan}) { - my $delta_time = sprintf("%.03f", &gettimeofday() - $cache{jointime}{$chan}); + my $delta_time = sprintf("%.03f", &timeget() - $cache{jointime}{$chan}); $delta_time = 0 if ($delta_time < 0); &status("$b_blue$chan$ob: sync in ${delta_time}s."); @@ -495,7 +495,7 @@ sub on_join { } ### TODO: move this to &joinchan()? - $cache{jointime}{$chan} = &gettimeofday(); + $cache{jointime}{$chan} = &timeget(); rawout("WHO $chan"); return; @@ -684,6 +684,15 @@ sub on_notice { # password accepted. if ($args =~ /^Password a/i) { + my $done = 0; + + foreach ( &ChanConfList("chanServ_ops") ) { + next unless &chanServCheck($_); + next if ($done); + &DEBUG("nickserv activated or restarted; doing chanserv check."); + $done++; + } + $nickserv++; } } elsif ($nick =~ /^ChanServ$/i) { # chanserv.