This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Channel Banlist => Restarting an eggdrop VS ban-time XX

Old posts that have not been replied to for several years.
Locked
g
gemeau50
Voice
Posts: 38
Joined: Fri Jun 11, 2004 6:16 am
Location: Trois-Rivières, Canada

Channel Banlist => Restarting an eggdrop VS ban-time XX

Post by gemeau50 »

Version: 1.6.16

When restarting a bot, it waits for a period equal to the "ban-time" before starting removing bans equal to "ban-time" or older. By removing older ones, it means that it is able to remove bans set before it joined a channel. Therefore, why doesn't it start removing bans as soon as it joins a channel?

TIA
User avatar
YooHoo
Owner
Posts: 939
Joined: Thu Feb 13, 2003 10:07 pm
Location: Redwood Coast

Post by YooHoo »

Code: Select all

# Set this setting to 1 if you want your bot to expire
# bans/exempts/invites set by other opped bots on the channel.
set force-expire 0
:mrgreen:
g
gemeau50
Voice
Posts: 38
Joined: Fri Jun 11, 2004 6:16 am
Location: Trois-Rivières, Canada

Post by gemeau50 »

It is already set to 1.

For argument sake, let say: ban-time = 60 minutes

My question wasn't how to make a bot removed expired bans but why does it have to wait a period of time equal to the "ban-time" (60 minutes) after joining a channel before starting to cleanup the channel banlist?

ex.:
Bot left channel 7:45
Bot rejoined channel 8:00
It won't start cleaning the channel banlist before 9:00
and when it does, it will remove all bans which have been on the channel for more than 60 minutes.
User avatar
YooHoo
Owner
Posts: 939
Joined: Thu Feb 13, 2003 10:07 pm
Location: Redwood Coast

Post by YooHoo »

ah :roll: i misread your question... seems like this would be easy enough to manipulate via tcl. You've explained what happens atm, could you also let us know what you wish the end result to be...just cos I'm dense like a brick :wink:
g
gemeau50
Voice
Posts: 38
Joined: Fri Jun 11, 2004 6:16 am
Location: Trois-Rivières, Canada

Post by gemeau50 »

In fact, it does what expected but with a delay.

My eggdrop doesn't have individual ban-time per channel but uses "global-ban-time".

set global-ban-time 60

08:00 bans #1
08:15 bans #2
08:30 bot joined channel
09:30 bot removed bans 1 and 2.

In order remove these bans, it has to update its internal channel banlist (or something similar). It seems that there is something being triggered after 60 minute which tells the bot to wake up and start checking the channel banlist for overdue bans which needs to be removed.

I presume that there is an operation being done through a timer which evaluates the time length of a ban:
time present - ban-time > 60 minutes
in order to identify overdue bans.

The only thing I am wondering is why does it have to wait for a period of time equal to the ban-time before working on the channel banlist rather than doing it as soon as it joins a channel?
User avatar
gumbydammit
Master
Posts: 311
Joined: Thu Sep 05, 2002 4:52 pm
Location: Canada
Contact:

Post by gumbydammit »

because when it joins a channel it has no idea when the bans active on the channel were set..how could it if it was not there ?
a.k.a. hellios
g
gemeau50
Voice
Posts: 38
Joined: Fri Jun 11, 2004 6:16 am
Location: Trois-Rivières, Canada

Post by gemeau50 »

Then, can you tell why it is able to find out an hour later? Bans were done before its joining time.
g
greenbear
Owner
Posts: 733
Joined: Mon Sep 24, 2001 8:00 pm
Location: Norway

Post by greenbear »

gumbydammit wrote:because when it joins a channel it has no idea when the bans active on the channel were set..how could it if it was not there ?
a raw lookup give you the time the ban is set, and by who.
g
gemeau50
Voice
Posts: 38
Joined: Fri Jun 11, 2004 6:16 am
Location: Trois-Rivières, Canada

Post by gemeau50 »

gb wrote:a raw lookup give you the time the ban is set, and by who.
I presume that it uses a command similar to:
mode #channel_name b
and gets its info's via raw 367 and 368

Why can this be done when it joins a channel?
Locked