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.

can somebody help me?

Old posts that have not been replied to for several years.
Locked
s
snow-ball
Voice
Posts: 22
Joined: Fri Oct 26, 2001 8:00 pm

Post by snow-ball »

Hello

I have a tcl may be it has errors.. i want yo modify something but i need some help..
set add_chans "#mychan #help" 
bind pubm - "*how*login*" how_login
proc how_login { nick uhost hand chan arg } {
global add_chans
    putserv "PRIVMSG $add_chans :The anwers here"
}

My bot is on seven channels, but I want to my script be active in that two channels only.. but for example my bot is on #test and when somebody type "how to login" the bot say the anwer in #mychan and #help... any ideas how to fix it? Sorry for my english :/

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

Post by ppslim »

Code: Select all

set add_chans "#mychan #help" 
bind pubm - "*how*login*" how_login
proc how_login { nick uhost hand chan arg } {
  global add_chans
  if {[lsearch -exact [split [string tolower $add_chans]] [string tolower $chan]] < 0} { return }
  putserv "PRIVMSG $add_chans :The anwers here"
}
s
snow-ball
Voice
Posts: 22
Joined: Fri Oct 26, 2001 8:00 pm

Post by snow-ball »

Tks for you help.. It help me a lot

There only was a litte mistake my... i think
I change [putserv "PRIVMSG $add_chans :My answer"]
to
[putserv "PRIVMSG $chan :my answe"]

Because when some body type "how to login" the boy say the say #help
Example:
> how to login
<A> #help

:smile:
Locked