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.
Y
Yoda
Halfop
Posts: 78
Joined: Thu Oct 24, 2002 2:57 am
Location: Milano, Italy
Contact:

bot answer in private

Post by Yoda »

I use a script that get the bot answer to question in public chat, this is a standard bind pubm script

how to do a script that get the bot answer in the same way but in a private window? user ask something to the bot in private window and the bot answer in the same private window.

someone knows that? :lol:

Yoda
K
Kingster

Post by Kingster »

Well, instead of doing something along this line:

Code: Select all

putserv "PRIVMSG $chan :$Text_to_send"
Do something like

Code: Select all

putserv "PRIVMSG $nick :$Text_to_send"
Y
Yoda
Halfop
Posts: 78
Joined: Thu Oct 24, 2002 2:57 am
Location: Milano, Italy
Contact:

Post by Yoda »

thanks,

I know this, and result in a notice to the nick. My question was another how get a user ask something to the bot in a private window with the bot and it answer in the same private window.
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

When the user asks the bot somthing in a private window, you us ethe MSG and MSGM binds to capture it.

As for send replies to this private window, the yes, you should be useing

Code: Select all

puthelp "PRIVMSG $nick :test here"
If this isn't sent tot he private window, then, it is a result of the client being setup incorectly, and not eggdrop.
Y
Yoda
Halfop
Posts: 78
Joined: Thu Oct 24, 2002 2:57 am
Location: Milano, Italy
Contact:

Post by Yoda »

thanks!
I'm not so confident with tcl. Could you give me the script to use?
K
Kingster

Post by Kingster »

Instead of using "bind pubm", do "bind msgm".
Y
Yoda
Halfop
Posts: 78
Joined: Thu Oct 24, 2002 2:57 am
Location: Milano, Italy
Contact:

Post by Yoda »

tried but dont work, do you know the rest of the script?
K
Kingster

Post by Kingster »

no, because I don't know what your script is...
Y
Yoda
Halfop
Posts: 78
Joined: Thu Oct 24, 2002 2:57 am
Location: Milano, Italy
Contact:

Post by Yoda »

this is the public message script, and work fine. I'm trying to do the same but only in private window, question and answer



bind pubm - "*nick*" pub:nick

proc pub:nick { nick uhost handle chan arg } {
putserv "PRIVMSG $chan :message" }
K
Kingster

Post by Kingster »

Yoda wrote:this is the public message script, and work fine. I'm trying to do the same but only in private window, question and answer



bind pubm - "*nick*" pub:nick

proc pub:nick { nick uhost handle chan arg } {
putserv "PRIVMSG $chan :message" }
This SHOULD work...

Code: Select all

bind msgm - "*nick*" pub:nick

proc pub:nick { nick uhost handle arg } {
  putserv "PRIVMSG $nick :message" 
}
Y
Yoda
Halfop
Posts: 78
Joined: Thu Oct 24, 2002 2:57 am
Location: Milano, Italy
Contact:

Post by Yoda »

yust tried, dont work :)
K
Kingster

Post by Kingster »

you get an error?

Course - I'm not sure that you can have a proc nick as well as a var named nick as well... try changing it.
Y
Yoda
Halfop
Posts: 78
Joined: Thu Oct 24, 2002 2:57 am
Location: Milano, Italy
Contact:

Post by Yoda »

no, simply dont work, nothing happen
K
Kingster

Post by Kingster »

Try this....

Code: Select all

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

proc pub:respond_to_nick { nick uhost handle arg } { 
  putserv "PRIVMSG $nick :message" 
}
If that doesn't work, try msg instead of msgm.... I can never remember waht the diff is... :)
Y
Yoda
Halfop
Posts: 78
Joined: Thu Oct 24, 2002 2:57 am
Location: Milano, Italy
Contact:

Post by Yoda »

this create and error in .conf and bot died.
Locked