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.

bot answer in private

Old posts that have not been replied to for several years.
K
Kingster

Post by Kingster »

what was the error?
Y
Yoda
Halfop
Posts: 78
Joined: Thu Oct 24, 2002 2:57 am
Location: Milano, Italy
Contact:

Post by Yoda »

after .rehash connection reset and dont load .conf.
I had to # the script to get .conf running
Y
Yoda
Halfop
Posts: 78
Joined: Thu Oct 24, 2002 2:57 am
Location: Milano, Italy
Contact:

Post by Yoda »

I think that

Code: Select all

bind msgm -|- "*nick*" pub:respond_to_nick 

proc pub:respond_to_nick { nick uhost handle arg } { 
  putserv "PRIVMSG $nick :message" 
}

-|- is uncorrect
Y
Yoda
Halfop
Posts: 78
Joined: Thu Oct 24, 2002 2:57 am
Location: Milano, Italy
Contact:

Post by Yoda »

finally I got the working script

Code: Select all

bind msgm - ciao pubm:respond

proc pubm:respond { nick uhost handle arg } { 
  putserv "PRIVMSG $nick :message. " }
the problem is that I can use only one command and message answer, no more than one. If I add more only the first one works the others no.

Have you a nidea why?

Yoda
T
Thor

Post by Thor »

bind msgm - * msgm:respond

proc msgm:respond { nick uhost hand arg } {
......

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

Post by ppslim »

Yes. Read tcl-commands.doc

We can't do all the work for you.

Please read the differance between pub and pubm, and then msg and msgm.
Y
Yoda
Halfop
Posts: 78
Joined: Thu Oct 24, 2002 2:57 am
Location: Milano, Italy
Contact:

Post by Yoda »

thanks, I was not clear :)

I would like to have a FAQ that works in private window with the bot, so many different answer and questions. The script that I use for it works very good in public chat, but not (after the corrections [bind msgm....]) in private window. Seems that in private does not "read" more than 1. I yust tried many different solutions nut no one works.

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

Post by ppslim »

We are aware of this.

Maybe, if you tried posting error messages, or code, that doesn't work. We can help locate any errors.

Many things don't work in life. Saying that somthing doesn't work, when we can't see what somthing is, is usless.
Y
Yoda
Halfop
Posts: 78
Joined: Thu Oct 24, 2002 2:57 am
Location: Milano, Italy
Contact:

Post by Yoda »

example:

Code: Select all

bind msgm - question1 pubm:question1

proc pubm:question1 { nick uhost handle arg } { 
  putserv "PRIVMSG $nick :answer1 text " }

bind msgm - question2 pubm:question2

proc pubm:question2 { nick uhost handle arg } { 
  putserv "PRIVMSG $nick :answer2 text " }

bind msgm - question3 pubm:question3

proc pubm:question3 { nick uhost handle arg } { 
  putserv "PRIVMSG $nick :answer3 text " }

bind msgm - question4 pubm:question4

proc pubm:question4 { nick uhost handle arg } { 
  putserv "PRIVMSG $nick :answer4 text " }

....and so on.....

work only for the first question and do nothing with other questions
Yoda
T
Thor

Post by Thor »

NO !

Code: Select all

bind msgm - * msgm:respond 

proc msgm:respond { nick uhost hand arg } { 
    if [string match *whatuwant* $arg] { then 
    } elseif [string match *otherthing* $arg] { then ...

    }
    
 }

I have done a string match but u can do something else, that depends on what u need exactly
Y
Yoda
Halfop
Posts: 78
Joined: Thu Oct 24, 2002 2:57 am
Location: Milano, Italy
Contact:

Post by Yoda »

I'm not so expert to prepare a script ready to use. Could you help me?

Yoda
Locked