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.
Old posts that have not been replied to for several years.
w
woodencross
Post
by woodencross » Wed Jun 30, 2004 4:27 pm
Hey guys,
how can I check out, from the partyline, which tcl-scripts are loaded?
Greetz, woodencross
dollar
Op
Posts: 178 Joined: Tue Oct 28, 2003 3:47 pm
Location: Netherlands
Post
by dollar » Thu Jul 01, 2004 2:34 am
You can't, there's currently no mechanism which adds loaded scripts to a list or so. Take a look at proc names/binds, perhaps you can trace 'em back to certain scripts.
dollar (or something similar) at:
#eggdrop / #tcl - undernet
#egghelp / #tcl / #eggtcl - efnet
#eggdrop.support / #tcl - quakenet
#eggdrop - ircnet
metroid
Owner
Posts: 771 Joined: Wed Jun 16, 2004 2:46 am
Post
by metroid » Thu Jul 01, 2004 3:45 am
There is a script that shows u all the scripts loaded, and you can also load/unload script with it from the partyline.
Its name is "unloadtcl"
I don't remember where i downloaded it though
KrzychuG
Master
Posts: 306 Joined: Sat Aug 16, 2003 2:51 pm
Location: Torun, Poland
Contact:
Post
by KrzychuG » Thu Jul 01, 2004 7:40 am
Yes, i remember that tcl. It should be in egghelp.org database, but doesn't work too good
Que?
greenbear
Owner
Posts: 733 Joined: Mon Sep 24, 2001 8:00 pm
Location: Norway
Post
by greenbear » Thu Jul 01, 2004 10:24 am
ok I'm bored .. anyways this totally inacurate script should list all the scripts that's been loaded in the config file.
Code: Select all
bind dcc -|- loaded loaded:scripts
proc loaded:scripts {hand idx arg} {
global config
set conf [open $config r]
while {![eof $conf]} {
set out [gets $conf]
if {([string match -nocase *source* $out]) && (![string match -nocase *#* $out])} {
putdcc $idx "[lindex $out 1]"
}
}
close $conf
}
dollar
Op
Posts: 178 Joined: Tue Oct 28, 2003 3:47 pm
Location: Netherlands
Post
by dollar » Thu Jul 01, 2004 1:05 pm
That doesnt say anything about loaded scripts. I'm often too lazy to edit the config, and just .tcl source a bunch of 'em, which your script wouldn't detect :].
Last edited by
dollar on Thu Jul 01, 2004 2:08 pm, edited 2 times in total.
dollar (or something similar) at:
#eggdrop / #tcl - undernet
#egghelp / #tcl / #eggtcl - efnet
#eggdrop.support / #tcl - quakenet
#eggdrop - ircnet
greenbear
Owner
Posts: 733 Joined: Mon Sep 24, 2001 8:00 pm
Location: Norway
Post
by greenbear » Thu Jul 01, 2004 1:18 pm
dollar wrote: That doesnt say anything about loaded scripts. I'm often too lazy to edit the config, and just .tcl source a bunch of 'em, which your script wouldn't detect :].
Which is why i labeled it totally inacurate.
dollar
Op
Posts: 178 Joined: Tue Oct 28, 2003 3:47 pm
Location: Netherlands
Post
by dollar » Thu Jul 01, 2004 1:30 pm
But you also said it should list all loaded scripts
Last edited by
dollar on Thu Jul 01, 2004 2:07 pm, edited 2 times in total.
dollar (or something similar) at:
#eggdrop / #tcl - undernet
#egghelp / #tcl / #eggtcl - efnet
#eggdrop.support / #tcl - quakenet
#eggdrop - ircnet
greenbear
Owner
Posts: 733 Joined: Mon Sep 24, 2001 8:00 pm
Location: Norway
Post
by greenbear » Thu Jul 01, 2004 1:35 pm
gb wrote: ok I'm bored .. anyways this totally inacurate script should list all the scripts that's been loaded in the config file.
mhm
dollar
Op
Posts: 178 Joined: Tue Oct 28, 2003 3:47 pm
Location: Netherlands
Post
by dollar » Thu Jul 01, 2004 2:08 pm
You win :p
dollar (or something similar) at:
#eggdrop / #tcl - undernet
#egghelp / #tcl / #eggtcl - efnet
#eggdrop.support / #tcl - quakenet
#eggdrop - ircnet
greenbear
Owner
Posts: 733 Joined: Mon Sep 24, 2001 8:00 pm
Location: Norway
Post
by greenbear » Thu Jul 01, 2004 2:21 pm
/me hands dollar a cookie
user
Posts: 1452 Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway
Post
by user » Thu Jul 01, 2004 5:01 pm
Why not replace 'source' and have it create a log of some sort?
btw: "unloading" a tcl script is very hard to do using code. I've never seen a script capable of doing such a thing in a satisfying way. There can be variables/aliases/namespaces/commands/procs/timers/binds etc. scattered all over the interpreter and things shared/needed by other scripts also used by the script about to get unloaded.
Have you ever read "The Manual"?