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.
Old posts that have not been replied to for several years.
Yoda
Halfop
Posts: 78 Joined: Thu Oct 24, 2002 2:57 am
Location: Milano, Italy
Contact:
Post
by Yoda » Thu Oct 24, 2002 1:07 pm
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?
Yoda
K
Kingster
Post
by Kingster » Thu Oct 24, 2002 1:37 pm
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"
Yoda
Halfop
Posts: 78 Joined: Thu Oct 24, 2002 2:57 am
Location: Milano, Italy
Contact:
Post
by Yoda » Thu Oct 24, 2002 1:44 pm
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.
ppslim
Revered One
Posts: 3914 Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England
Post
by ppslim » Thu Oct 24, 2002 2:20 pm
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.
Yoda
Halfop
Posts: 78 Joined: Thu Oct 24, 2002 2:57 am
Location: Milano, Italy
Contact:
Post
by Yoda » Thu Oct 24, 2002 2:27 pm
thanks!
I'm not so confident with tcl. Could you give me the script to use?
K
Kingster
Post
by Kingster » Thu Oct 24, 2002 3:17 pm
Instead of using "bind pubm", do "bind msgm".
Yoda
Halfop
Posts: 78 Joined: Thu Oct 24, 2002 2:57 am
Location: Milano, Italy
Contact:
Post
by Yoda » Thu Oct 24, 2002 3:34 pm
tried but dont work, do you know the rest of the script?
K
Kingster
Post
by Kingster » Thu Oct 24, 2002 3:40 pm
no, because I don't know what your script is...
Yoda
Halfop
Posts: 78 Joined: Thu Oct 24, 2002 2:57 am
Location: Milano, Italy
Contact:
Post
by Yoda » Thu Oct 24, 2002 3:50 pm
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 » Thu Oct 24, 2002 4:04 pm
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"
}
Yoda
Halfop
Posts: 78 Joined: Thu Oct 24, 2002 2:57 am
Location: Milano, Italy
Contact:
Post
by Yoda » Thu Oct 24, 2002 4:08 pm
yust tried, dont work
K
Kingster
Post
by Kingster » Thu Oct 24, 2002 4:14 pm
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.
Yoda
Halfop
Posts: 78 Joined: Thu Oct 24, 2002 2:57 am
Location: Milano, Italy
Contact:
Post
by Yoda » Thu Oct 24, 2002 4:16 pm
no, simply dont work, nothing happen
K
Kingster
Post
by Kingster » Thu Oct 24, 2002 4:19 pm
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...
Yoda
Halfop
Posts: 78 Joined: Thu Oct 24, 2002 2:57 am
Location: Milano, Italy
Contact:
Post
by Yoda » Thu Oct 24, 2002 4:28 pm
this create and error in .conf and bot died.