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.

learn tcl

Old posts that have not been replied to for several years.
Locked
D
Dreadfull

learn tcl

Post by Dreadfull »

i just downloaded hal-learn-0.2.tcl from egghelp.org
i want to modify the script so instead of using: ?? <keyword> .. to use <botnick> tell <nick> about <keyword>
so he will tell on channel the definition to the <nick> not to the one who asked ... i mean not to $nick ..
any ideas on how to do that ? i don't know tcl scripting, only mircscripting
and on mircscripting i would use * and $2 ... $2 would be the <nick> ..
who can help me ?
User avatar
]Kami[
Owner
Posts: 590
Joined: Thu Jul 24, 2003 2:59 pm
Location: Slovenia
Contact:

Post by ]Kami[ »

Yeah, in tcl scripting instead $2 or $3 you use args.It looks like this:

Code: Select all

bind pub -|- "!voice" pub:voice

proc pub:voice {nick uhost hand chan args} {
	set args [split [cleanarg $args]]
                set who [lindex $args 0]
putquick "MODE $chan +v $who"

}
This are only simple lines in which you can see how args are used.So here if nick type !voice <nick> (<nick> is place where you put nick of guy you want to voice), then bot will voice guy with nick you put after !voice command...
D
Dreadfull

help

Post by Dreadfull »

yea well it's a bit more complicated, i think the script uses the 2nd word
look:
bind pub m !learn learn_learn
bind pub - "botnick" learn_explain
bind pub - "!search" learn_search
i added botnick and changed from ** to !learn and so on ..
but if i change the 2nd line from above to
bind pub - "botnick tell" learn_explain
it will search for word "tell" instead of the 3rd word, so something must be changed in the whole script.
if you can download hal-learn tcl and modify it so when i type
<botnick> tell <nick> about <keyword> it will return
<nick> <definition>
here is the link: http://www.egghelp.org/files/tcl/hal-learn-0.2.tcl.gz
thanks
J
Jailmann
Voice
Posts: 33
Joined: Fri Apr 09, 2004 2:50 pm

Post by Jailmann »

Hallo

i have another question i have download the learn script this one "Learn v1.0 by Nite"

when i ask ?? keyword can i get it to work like this keyword? and can i get it to work for only the channel i want

could sone one help me then i will be very happy
Locked