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.

Check out what tcl is loaded

Old posts that have not been replied to for several years.
Locked
w
woodencross

Check out what tcl is loaded

Post by woodencross »

Hey guys,

how can I check out, from the partyline, which tcl-scripts are loaded?

Greetz, woodencross
d
dollar
Op
Posts: 178
Joined: Tue Oct 28, 2003 3:47 pm
Location: Netherlands

Post by dollar »

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
m
metroid
Owner
Posts: 771
Joined: Wed Jun 16, 2004 2:46 am

Post by metroid »

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
User avatar
KrzychuG
Master
Posts: 306
Joined: Sat Aug 16, 2003 2:51 pm
Location: Torun, Poland
Contact:

Post by KrzychuG »

Yes, i remember that tcl. It should be in egghelp.org database, but doesn't work too good :(
Que?
g
greenbear
Owner
Posts: 733
Joined: Mon Sep 24, 2001 8:00 pm
Location: Norway

Post by greenbear »

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
}
d
dollar
Op
Posts: 178
Joined: Tue Oct 28, 2003 3:47 pm
Location: Netherlands

Post by dollar »

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
g
greenbear
Owner
Posts: 733
Joined: Mon Sep 24, 2001 8:00 pm
Location: Norway

Post by greenbear »

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.
d
dollar
Op
Posts: 178
Joined: Tue Oct 28, 2003 3:47 pm
Location: Netherlands

Post by dollar »

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
g
greenbear
Owner
Posts: 733
Joined: Mon Sep 24, 2001 8:00 pm
Location: Norway

Post by greenbear »

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
d
dollar
Op
Posts: 178
Joined: Tue Oct 28, 2003 3:47 pm
Location: Netherlands

Post by dollar »

You win :p
dollar (or something similar) at:
#eggdrop / #tcl - undernet
#egghelp / #tcl / #eggtcl - efnet
#eggdrop.support / #tcl - quakenet
#eggdrop - ircnet
g
greenbear
Owner
Posts: 733
Joined: Mon Sep 24, 2001 8:00 pm
Location: Norway

Post by greenbear »

/me hands dollar a cookie :lol:
User avatar
user
 
Posts: 1452
Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway

Post by user »

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"?
Locked