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.
FiskerEnDK
Voice
Posts: 17 Joined: Thu Jan 16, 2003 7:18 am
Post
by FiskerEnDK » Sun Jan 19, 2003 7:05 pm
i have this script:
# Settings
set channels "#channel1 #channel2"
set trigger(char) "!"
# Binding
bind pub - [string trim $trigger(char)]info pub:info
# Proc
global channels
proc pub:info {nick uhost hand chan text} {
putserv "NOTICE $nick :Information about blabla"
}
its working very fine.. thats ok.. nothere there
but i cant get it to only show on the channels i've write for set channels
why??
FiskerEnDK
Voice
Posts: 17 Joined: Thu Jan 16, 2003 7:18 am
Post
by FiskerEnDK » Sun Jan 19, 2003 7:06 pm
if i add the bot to a new Channel the funktion is still working...
ppslim
Revered One
Posts: 3914 Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England
Post
by ppslim » Sun Jan 19, 2003 7:08 pm
Because Tcl isn't as inteligent as that.
Apart from setting a variable, for the channel you want it to work in, you have to check if the channel a script is used, is one of those channels.
A variable is jjust a place you can store things in, like results, data, and other bits.
However, just because you put channel names in a variable, it doesn't mean it knows what you want doing with them.
FiskerEnDK
Voice
Posts: 17 Joined: Thu Jan 16, 2003 7:18 am
Post
by FiskerEnDK » Sun Jan 19, 2003 7:11 pm
Ok there fore it dosent work a [censored] using these set channel like almost every TCL scritper use... ?
ppslim
Revered One
Posts: 3914 Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England
Post
by ppslim » Sun Jan 19, 2003 7:31 pm
I fail to understand anything said in the previous post.
The only word that made sence was the blanked out swear word.
FiskerEnDK
Voice
Posts: 17 Joined: Thu Jan 16, 2003 7:18 am
Post
by FiskerEnDK » Sun Jan 19, 2003 7:37 pm
Nearly Every TCL script have
set chan "#lamer" or somethin like that..
but why is it writed of not useable??
And if i have 2 channels that gonna have 2 deferent Scripts i cant to that then?
ppslim
Revered One
Posts: 3914 Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England
Post
by ppslim » Sun Jan 19, 2003 7:42 pm
Yes, this is true.
Most scripts do have some form of
So it only works in that channel.
However, if you look inside the Script more, you will see that there is more to it, than just the "set" command.
FiskerEnDK
Voice
Posts: 17 Joined: Thu Jan 16, 2003 7:18 am
Post
by FiskerEnDK » Sun Jan 19, 2003 7:44 pm
Ok can u then please tell me how to do that with my script?
Papillon
Owner
Posts: 724 Joined: Fri Feb 15, 2002 8:00 pm
Location: *.no
Post
by Papillon » Sun Jan 19, 2003 8:43 pm
Code: Select all
set channels [list #channel1 #channel2]
set trigger(char) "!"
# Binding
bind pub - [string trim $trigger(char)]info pub:info
# Proc
proc pub:info {nick uhost hand chan text} {
global channels
if {[lsearch $channels $chan] != -1} {
putserv "NOTICE $nick :Information about blabla"
}
}
now pleeez try to at least make an effort to understand this.. this is a very smple code and it's not hard to understand at all...
also if you don't even understand the set/global command you should really check out some tutorials... suninet is a good place to start
Elen sila lúmenn' omentielvo