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.

Universal channel script

Support & discussion of released scripts, and announcements of new releases.
Post Reply
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

hey folks

as seemingly eggheads won't be releasing new bot version anytime soon (although they've patched the bug affecting xchannel almost an year ago in CVS), a need arises for somehow fixing that notorious bug via scripting

how should I do that? by intercepting .chanset and handling xchannel's long chansets writing to chanfile in the script itself? any other ideas?
connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use

Code: Select all

 tag when posting logs, code
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

You can create your own chanfile, and use a command like .xchanset instead of .chanset and .xchaninfo instead of .chaninfo.
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

hmm, on a second thought, that's pretty much the only way to do it - since unfortunately, I simply can't have control over chanfile writing process
connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use

Code: Select all

 tag when posting logs, code
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

okay folks, I've had it with those lazy eggheads

as apparently they couldn't care less about releasing a new version (it's been year and a half already since the last), I had to do something for xchannel to compensate for that long-standing cut-channel-settings bug in 1.6.17

from now on, you don't need to patch your bot in order not to lose xchannel's settings - a new version 3.5 of the script is out, with proper chanfile saving (in fact, it emulates yet-to-be-released 1.6.18 hehe)

enjoy!
connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use

Code: Select all

 tag when posting logs, code
User avatar
dusk
Halfop
Posts: 91
Joined: Sun Mar 06, 2005 7:25 pm
Location: Belgium

Post by dusk »

Congratz demond, I'm using your script practicually on most of my bots, and still have others to install it in (somewhat 21 intotal) and actually it became a drag to rebuild en change every bot so I could use your script. I'ts a big progress, certainly for me, cause I didn't always got the result I expected when rebuilding the existing bots. Thx.

Fine job

GRTZ dusk :)
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

demond, demond, demond .... There's a very old saying, "Patience is a virtue". :lol:

Seriously, this "update/new release" is beginning to get a bit long winded but, when there is only (apparently) one person working on it now I guess delays are inevitable.

* Alchera waits
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

well, now that I managed to fix this thing w/o waiting for jolly eggheads to put their act together, maybe I should move on and make eggdrop multiserver hehe - I know they would never do that
connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use

Code: Select all

 tag when posting logs, code
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

I have noticed when loading xchannel for the first time not one of the default settings carry across into other existing channel record(s).

I did notice that not long after it was loaded the bot left the two dynamically allocated channels it was in (after a rehash) and after re-adding them those channels inherited the default settings.

Later adding a channel dynamically I noticed it inherited none of the default settings.

Having the script setup so that the default settings are inherited by all existing channels and those dynamically added to the bot later would be a boon. :D
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

I can't reproduce that on my bots

I'll look into it again when (if) someone else confirms the issue
connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use

Code: Select all

 tag when posting logs, code
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

demond wrote:I can't reproduce that on my bots
I can. :P
.+chan #testes

Code: Select all

Natale User defined channel settings:
Natale x:drone:bantype: 0   x:drone:bantime: 0   x:door:bantype: 0   x:door:bantime: 0   
Natale x:flood:bantype: 0   x:flood:bantime: 0   x:clone:bantype: 0   x:clone:bantime: 0   
Natale x:spam:bantype: 0   x:spam:bantime: 0   x:repeat:bantype: 0   x:repeat:bantime: 0   
Natale x:whois:bantype: 0   x:whois:bantime: 0   x:bad:bantype: 0   x:bad:bantime: 0   
Natale x:caps:bantype: 0   x:caps:bantime: 0   x:color:bantype: 0   x:color:bantime: 0   
Natale x:lag:threshold: 0   x:drone:score: 0   x:door:stay: 0   x:mass:duration: 0   
Natale x:clone:type: 0   x:clone:count: 0   x:whois:count: 0   x:caps:percent: 0   
Natale x:limit:slack: 0   
Natale User defined channel strings:
Natale x:drone:punish: {}
Natale x:drone:reason: {}
Natale x:door:punish: {}
Natale x:door:reason: {}
Natale x:flood:punish: {}
Natale x:flood:reason: {}
Natale x:clone:punish: {}
Natale x:clone:reason: {}
Natale x:spam:punish: {}
Natale x:spam:reason: {}
Natale x:repeat:punish: {}
Natale x:repeat:reason: {}
Natale x:whois:punish: {}
Natale x:whois:reason: {}
Natale x:bad:punish: {}
Natale x:bad:reason: {}
Natale x:caps:punish: {}
Natale x:caps:reason: {}
Natale x:color:punish: {}
Natale x:color:reason: {}
Natale x:mass:rate: {}
Natale x:repeat:rate: {}
Natale x:whois:file: {}
Natale x:bad:file: {}
Natale [06:21] #Alchera# chaninfo #testes
Both badwhois.txt & badwords.txt were uploaded prior to the bot being restarted with xchannel.tcl.
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

xchannel detects restart (or startup) and schedules script reload after 5 seconds:

Code: Select all

if {[lsearch [modules] channels*] == -1} {
	putlog "$version: ERROR: channels module is not loaded"
	return
} elseif {[llength [channels]] == 0} {
	if {[llength [userlist]] == 0} {
		putlog "$version: restart detected"
		utimer 5 [list source [info script]]
		return
	} {
		putlog "$version: ERROR: no channels defined"
		return
	}
}
this is done because of the order eggdrop loads config, chan- and userfile, i.e. the scripts being loaded in the config don't have access to user- and chanfile ([llength [userlist]] == 0, [llength [chanlist]] == 0) on (re)start

so the bot you have this issue with is probably too slow loading everything in 5 secs, hence the problem

try increasing that delay
connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use

Code: Select all

 tag when posting logs, code
s
spock
Master
Posts: 319
Joined: Thu Dec 12, 2002 8:40 pm

Post by spock »

try using the "loaded" evnt bind
photon?
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

spock wrote:try using the "loaded" evnt bind
tried this before with spambuster; doesn't work on start, only on restart, or something like that - a glitch that they should have fixed already
connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use

Code: Select all

 tag when posting logs, code
s
spock
Master
Posts: 319
Joined: Thu Dec 12, 2002 8:40 pm

Post by spock »

ah.. right you are

edit: actually it does seem to work over here
bind evnt - evnt:loaded ; proc evnt:loaded t { putlog $t }
sure enough, it spits out "loaded" on ./eggdrop -n
Last edited by spock on Thu Feb 09, 2006 2:39 am, edited 1 time in total.
photon?
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

Code: Select all

Alchera .+chan #testes
Natale [00:01] #Alchera# +chan #testes
Natale [00:01] Tcl error [::xchannel::mass]: can't read "maxr": no such variable
To my mind the above should not happen at all considering it's a new channel being added and nothing has been set (as yet).

Code: Select all

Alchera .set errorInfo
Natale [00:06] #Alchera# set errorInfo
Natale Currently: can't read "maxr": no such variable
Natale Currently:     while executing
Natale Currently: "if {$n >= $maxr} {
Natale Currently:    if {[unixtime] - $ts <= $maxt} {
Natale Currently:     set thr [channel get $chan x:lag:threshold]
Natale Currently:     if {![botisop $chan]} {return}
Natale Currently:     if {$lag..."
Natale Currently:     (procedure "::xchannel::mass" line 16)
Natale Currently:     invoked from within
Natale Currently: "::xchannel::mass $_p1 $_p2 $_p3 $_p4 $_p5"
I opped the bot on entry.

The resultant channel record is as I posted above; none of the scripts default settings are saved for the new channel.

Eggdrop: 1.6.17.0
OS: Red Hat 9

The above results are also identical with Windrop (under Windows 2003 Enterprise Edition Enterprise 5.2 Service Pack 1 (Build #3790)).

PS: I also did as suggested (above). :D
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
Post Reply