git-svn-id: https://svn.code.sf.net/p/infobot/code/branches/don/dpkg@1285
c11ca15a-4712-0410-83d8-
924469b57eb5
return if ($_[0] eq "2"); # defer.
}
return if ($_[0] eq "2"); # defer.
}
+ # NO SEEN FLUSHING!!!
+ return;
# is this global-only?
return unless (&IsChanConf("seen") > 0);
return unless (&IsChanConf("seenFlushInterval") > 0);
# is this global-only?
return unless (&IsChanConf("seen") > 0);
return unless (&IsChanConf("seenFlushInterval") > 0);
if ($param{'DBType'} =~ /^(mysql|pgsql|sqlite(2)?)$/i) {
foreach $nick (keys %seencache) {
if ($param{'DBType'} =~ /^(mysql|pgsql|sqlite(2)?)$/i) {
foreach $nick (keys %seencache) {
+ my $lastcount = &sqlSelect('seen','messagecount',{nick=>lc $seencache{$nick}{'nick'}}) || 0;
my $retval = &sqlReplace("seen", {
nick => lc $seencache{$nick}{'nick'},
time => $seencache{$nick}{'time'},
host => $seencache{$nick}{'host'},
channel => $seencache{$nick}{'chan'},
message => $seencache{$nick}{'msg'},
my $retval = &sqlReplace("seen", {
nick => lc $seencache{$nick}{'nick'},
time => $seencache{$nick}{'time'},
host => $seencache{$nick}{'host'},
channel => $seencache{$nick}{'chan'},
message => $seencache{$nick}{'msg'},
+ messagecount => $lastcount+$seencache{$nick}{'msgcount'},
+
} );
delete $seencache{$nick};
} );
delete $seencache{$nick};
- # TODO: fix on_disconnect()
+ my @join = &getJoinChans(1);
+ if (scalar @join) {
+ &FIXME('ircCheck: found channels to join! ' . join(',',@join));
+ &joinNextChan();
+ }
if (time() - $msgtime > 3600) {
# TODO: shouldn't we use cache{connect} somewhere?
if (time() - $msgtime > 3600) {
# TODO: shouldn't we use cache{connect} somewhere?
$cache{connect} = time();
}
}
$cache{connect} = time();
}
}
- if (grep /^\s*$/, keys %channels) {
- &WARN('ircCheck: we have a NULL chan in hash channels? removing!');
- if (!exists $channels{''}) {
- &DEBUG('ircCheck: this should never happen!');
- }
+ if (grep /^\s*$/, keys %channels) {
+ &WARN('ircCheck: we have a NULL chan in hash channels? removing!');
+ if (!exists $channels{''}) {
+ &DEBUG('ircCheck: this should never happen!');
+ }
+ if ($ident !~ /^\Q$param{ircNick}\E$/) {
+ # this does not work unfortunately.
+ &WARN("ircCheck: ident($ident) != param{ircNick}($param{ircNick}).");
+ # this check is misleading... perhaps we should do a notify.
+ if (! &IsNickInAnyChan( $param{ircNick} ) ) {
+ &DEBUG("$param{ircNick} not in use... changing!");
+ &nick( $param{ircNick} );
+ } else {
+ &WARN("$param{ircNick} is still in use...");