| View previous topic :: View next topic |
| Author |
Message |
ranny Halfop
Joined: 22 Jun 2005 Posts: 49 Location: switzerland
|
Posted: Tue Dec 27, 2005 7:16 pm Post subject: Chanlimit |
|
|
Hello,
i have chanlimit.tcl
| Code: | # ChanLimit.tcl by Nils Ostbjerg <shorty@business.auc.dk>
# (C) Copyright (1999)
#
# This script will limit a channel to the current number of users plus
# 5 once every min.
#
# This version of the ChanLimit script is useable with Eggdrop version
# 1.3.x
#
# Please report any bugs to me at shorty@business.auc.dk.
# Idea and suggestion to new features are also welcome.
#
# - Nils Ostbjerg <shorty@business.auc.dk>
#
# Version 1.3.2 - 19 Jun 2000 Made a grademargin so if the limit only
# needs to be change by 1 then it wont get
# changed. Thanks to Harvey for this idea.
# - Nils Ostbjerg <shorty@business.auc.dk>
#
# Version 1.3.1 - 30 Nov 1999 Minor cosmetic changes, so that all my
# scripts follow the same scheme.
# - Nils Ostbjerg <shorty@business.auc.dk>
#
# Version 1.3.0 - 30 Mar 1999 First version and should work ok
# - Nils Ostbjerg <shorty@business.auc.dk>
#
##########################################################################
# Binds #
##########################################################################
bind time - "* * * * *" time:ChanLimit
##########################################################################
# time:ChanLimit start #
##########################################################################
proc time:ChanLimit {min hour day month year} {
foreach chan [channels] {
set newlimit [expr [llength [chanlist $chan]] + 5]
set currentlimit [currentlimit $chan]
if {$currentlimit < [expr $newlimit - 0] || $currentlimit > [expr $newlimit + 0]} {
putserv "mode $chan +l $newlimit"
}
}
}
##########################################################################
# time:ChanLimit end #
##########################################################################
##########################################################################
# currentlimit start #
##########################################################################
proc currentlimit {chan} {
set currentmodes [getchanmode $chan]
if {[string match "*l*" [lindex $currentmodes 0]]} {
return [lindex $currentmodes end]
}
return 0
}
##########################################################################
# currentlimit end #
##########################################################################
##########################################################################
# putlog #
##########################################################################
putlog "Loaded ChanLimit (DLF)" |
and i have this error in partyline
| Quote: | <Eggy> [23:59] (!) timer drift -- spun 58 minutes
<Eggy> [00:00] --- Wed Dec 28 2005
<Eggy> [00:00] Backing up channel file...
<Eggy> [00:00] #team: mode change '+l 94' by Eggy!~teambot@d83-180-88-184.bluewin.ch
<Eggy> [00:00] #team: mode change '+l 94' by Eggy!~teambot@d83-180-88-184.bluewin.ch
<Eggy> [00:00] #team: mode change '+l 94' by Eggy!~teambot@d83-180-88-184.bluewin.ch
<Eggy> [00:00] #team: mode change '+l 94' by Eggy!~teambot@d83-180-88-184.bluewin.ch
<Eggy> [00:00] #team: mode change '+l 94' by Eggy!~teambot@d83-180-88-184.bluewin.ch
....
....
|
And i must restart eggdrop for stop this
 |
|
| Back to top |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
Posted: Tue Dec 27, 2005 7:19 pm Post subject: |
|
|
Use another chanlimit script, for example slennox's. _________________ Follow me on GitHub
- Opposing
Public Tcl scripts |
|
| Back to top |
|
 |
Alchera Revered One

Joined: 11 Aug 2003 Posts: 3344 Location: Ballarat Victoria, Australia
|
Posted: Tue Dec 27, 2005 7:34 pm Post subject: |
|
|
| ranny wrote: | | <Eggy> [23:59] (!) timer drift -- spun 58 minutes |
It appears it has nothing to do with the script. I have used that particular one since late 2000; error free to date.  _________________ Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM |
|
| Back to top |
|
 |
demond Revered One

Joined: 12 Jun 2004 Posts: 3073 Location: San Francisco, CA
|
Posted: Wed Dec 28, 2005 1:05 am Post subject: |
|
|
| Alchera wrote: | | ranny wrote: | | <Eggy> [23:59] (!) timer drift -- spun 58 minutes |
It appears it has nothing to do with the script. I have used that particular one since late 2000; error free to date.  |
it has severe flaws, namely failing to account for channel dynamics by join/part/quit/kick and working by timer only
for correct limiter implementation (that should come as no surprise for you ) see xchannel (SirFz's should also be properly coded by now) _________________ connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use [code] tag when posting logs, code |
|
| Back to top |
|
 |
Alchera Revered One

Joined: 11 Aug 2003 Posts: 3344 Location: Ballarat Victoria, Australia
|
Posted: Wed Dec 28, 2005 2:46 am Post subject: |
|
|
I must be blessed. It's been faultless for almost 5 yrs ... no error recorded to date; lucky me.
| Quote: | --> Professional_Killer (~Shooter@202.142.152.3) has joined #ballarat
* Enfield sets channel limit to 46 |
The limit is adjusted only as channel numbers increase/decrease. It's short, simple and it works. Try it.
Either way, beside the point. The information posted references 'timer drift' and that is the actual problem encountered, not the script. _________________ Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM |
|
| Back to top |
|
 |
demond Revered One

Joined: 12 Jun 2004 Posts: 3073 Location: San Francisco, CA
|
Posted: Wed Dec 28, 2005 3:30 am Post subject: |
|
|
| Alchera wrote: | I must be blessed. It's been faultless for almost 5 yrs ... no error recorded to date; lucky me.  |
you've been blessed with pretty quiet channel; if your users' average join rate was more than 5/min, this thing wouldn't be able to cope with that since it only adjusts +l once a minute with a slack of 5
| Quote: | | The limit is adjusted only as channel numbers increase/decrease. It's short, simple and it works. Try it. |
it works for you, for the above reason; nevertheless, it's naively implemented and won't work well on fast-paced channels
btw that line is amusing:
| Code: |
if {$currentlimit < [expr $newlimit - 0] || $currentlimit > [expr $newlimit + 0]} {
|
even Tosser would have written simply:
| Code: |
if {$currentlimit != $newlimit} {
|
_________________ connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use [code] tag when posting logs, code |
|
| Back to top |
|
 |
Alchera Revered One

Joined: 11 Aug 2003 Posts: 3344 Location: Ballarat Victoria, Australia
|
Posted: Wed Dec 28, 2005 9:10 am Post subject: |
|
|
Nothing is perfect demond, and nothing you've written is either. Is a brave person that poses as infallible.
| Quote: | | <Eggy> [23:59] (!) timer drift -- spun 58 minutes |
The above was his problem; not the script.
@ ranny: http://forum.egghelp.org/viewtopic.php?t=4067&highlight=drift _________________ Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM |
|
| Back to top |
|
 |
|