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.

Help with tcl

Old posts that have not been replied to for several years.
Locked
K
Kaarel
Halfop
Posts: 91
Joined: Sat Apr 26, 2003 5:24 am

Help with tcl

Post by Kaarel »

I have a code

Code: Select all

bind pub - !stats stats_pub

proc stats_pub {nick host handle chan args} { 
putserv "PRIVMSG $chan :Channel $chan  stats are http://www.hot.ee/cyberstats "
} 
What I have to change in that script that this script will work only in 1 channel.[/quote]
User avatar
stdragon
Owner
Posts: 959
Joined: Sun Sep 23, 2001 8:00 pm
Contact:

Post by stdragon »

Well, the $chan variable stores the channel name. So use an 'if' statement and a command like 'string compare' to make sure it's the channel you want.
User avatar
ReaLz
Op
Posts: 121
Joined: Sat Oct 19, 2002 5:33 am
Location: Athens, Greece

Post by ReaLz »

for example to what stdragon said, use this:

Code: Select all

set stats_chan "#tade"

bind pub - !stats stats_pub 

proc stats_pub {nick host handle chan args} { 
if {$chan == $::stats_chan} {
putserv "PRIVMSG $chan :$nick: you can find $chan channel's stats at http://www.hot.ee/cyberstats" 
}
}
«A fantastic spaghetti is a spaghetti that does not exist»
Locked