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.

Variable?

Old posts that have not been replied to for several years.
Locked
S
SniperAC

Post by SniperAC »

Is there a pre set Variable for the channel..
I have been lookin thro outher scripts and I see alot of $chan but no "set chan <>"

I used it in my script

Code: Select all

 putlog "!op command used in $chan" 
the bot sys in the party line "TCL error [pub:op]: can't read "chan": no such variable"
is there something I am doing rong?
is there a list of the pre set Variables?

Thanks in advanced..
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

It all depends how you define your "proc" command for the script.

In a pub command script, the proc would look somthing like
proc command {1 2 3 4 5} {
the 1 to 5 do not have to be a set name, but rather what you want to refer the data passed to them as, in the script.
1 would be the nick
2 would be the user@host
3 would be the handle
4 would be the channel
5 would be the rest of the test sent to the command on IRC

In this case, where you see $chan in many scripts, is because some1 has used "chan" in place of the number 4 in the above example.
S
SniperAC

Post by SniperAC »

Thanks alot ppslim..
Locked