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.

Trying a TCL script

Old posts that have not been replied to for several years.
Locked
l
lilGTO
Voice
Posts: 22
Joined: Tue Aug 24, 2004 2:59 pm
Contact:

Trying a TCL script

Post by lilGTO »

I am new to TCL scripting.... this is my first.....
Getting errors of course... can someone help?

Code: Select all

#Usage: !explain ourwebsite

#Set the word here to match.
set explainword "ourwebsite"

#Set the website matching the word here to display.
set explaindef "http://ourwebsite of course/"

### SCRIPT ###
bind pub n !explain explanation

explanation {nick uhost hand chan text} {
 global botnick explainword explaindef
  if {([string equal -nocase $explainword [lindex $text 0]])} {
   putserv "PRIVMSG $chan :The website for $explainword is: $explaindef"; 
return 0
   }
} 
Thx in advance for any help you can give me
lilGTO
User avatar
user
 
Posts: 1452
Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway

Re: Trying a TCL script

Post by user »

if you're trying to create a proc, invoking the command called 'proc' might be a good idea :wink:
Have you ever read "The Manual"?
l
lilGTO
Voice
Posts: 22
Joined: Tue Aug 24, 2004 2:59 pm
Contact:

Post by lilGTO »

oh gee... you are right....
but ya don't gotta be rude about it...yes i am reading the manual...
am learning this stuff... ok????
g
greenbear
Owner
Posts: 733
Joined: Mon Sep 24, 2001 8:00 pm
Location: Norway

Post by greenbear »

Where's the rude part ? He told you what the problem was and ended the post with a smiley.

The only rude part of this thread is a twat like you complaining when someone is nice enough to help, and the excessive use of question marks.
l
lilGTO
Voice
Posts: 22
Joined: Tue Aug 24, 2004 2:59 pm
Contact:

Post by lilGTO »

Ask a simple question get a simple reply.
New to all this tcl stuff guys, give me a break.
If ya'll aren't too upset with me I do have another question?
The procedure says PRIVMSG but shows up in the room instead of giving the info to the person asking for the website address. Should the $chan be $nick?

and sorry about the multiple ?'s .. been my way of typing for years, and am trying to stop doing it while talking with you ppl.

You guys are the best that there is here finding out what's what with this stuff. Believe it or not I do appreciate it.
User avatar
user
 
Posts: 1452
Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway

Post by user »

PRIVMSG is the irc command to send messages...the target can be a nick or a channel (so you're right about that change)
The "rude" comment about the manual is my signature, and if you find it offensive, you probably have some manual reading to do :P
Have you ever read "The Manual"?
l
lilGTO
Voice
Posts: 22
Joined: Tue Aug 24, 2004 2:59 pm
Contact:

Post by lilGTO »

Well thank you User for answering, I meant it not derogatory by any means, I am just trying to learn. Guess they should have a Slennox learners room for new TCL scripters and not throw them to the wolves, so to speak. Again, I apoligize for the extra ?'s in there and will refrain from offending anyone in the future. Thanks for your comments, and as I have said before you guys are great.
Locked