| View previous topic :: View next topic |
| Author |
Message |
devil_i Voice
Joined: 20 Sep 2007 Posts: 4
|
Posted: Thu Sep 20, 2007 2:22 pm Post subject: problem:bot answer only to me |
|
|
hi everybody
for the begining i MUST say that my english is not very good (actually it is bad ))
so sorry ))
now
i have a problem with eggdrop and windrop
we needed a bot for our channel, i searched and finded windrop.
i decided to write a little script to test it
here is source:
| Code: |
set our_chan "#chan"
bind pub -|- hello my_talk_handler
proc my_talk_handler {nick uhost hand chan text} {
global our_chan
if {[string tolower $chan] != $our_chan} {
return 0
}
putserv "privmsg $chan :$text $nick, hello!"
return 1
}
|
then i run windrop under windows, connect to it via telnet etc.
my bot was sitting on the channel.
i said him "hello" and he answer to me "devil_i, hello"
then my friend said him hello but there was no reaction.
we tried again and again but...
i tried to use eggdrop instead of windrop under FreeBSD 5.2.1
i compiled it, run it. it works, bot was sitting on a channel but again there was no reaction when my friend was talking with him.
so... help me plz )) |
|
| Back to top |
|
 |
TCL_no_TK Owner

Joined: 25 Aug 2006 Posts: 509 Location: England, Yorkshire
|
Posted: Thu Sep 20, 2007 10:17 pm Post subject: Re: problem:bot answer only to me |
|
|
the script would only work if someone says hello it wont work if they say something like hello, or bot hello. Check out the pubm bind rather than a pub bind since it allows for wildcard matching. _________________ TCL the misunderstood |
|
| Back to top |
|
 |
devil_i Voice
Joined: 20 Sep 2007 Posts: 4
|
Posted: Fri Sep 21, 2007 2:49 am Post subject: |
|
|
i changed code to
| Code: |
set our_chan "#chan"
bind pubm -|- hello my_talk_handler
proc my_talk_handler {nick uhost hand chan text} {
global our_chan
if {[string tolower $chan] != $our_chan} {
return 0
}
putserv "privmsg $chan :$text $nick, hello!"
return 1
}
|
but it still doesn't works |
|
| Back to top |
|
 |
TCL_no_TK Owner

Joined: 25 Aug 2006 Posts: 509 Location: England, Yorkshire
|
Posted: Fri Sep 21, 2007 3:00 am Post subject: RE: problem:bot answer only to me |
|
|
Try: | Code: | set our_chan "#chan"
proc my_talk_handler {nick host handle channel text} {
global our_chan
if {$channel == $our_chan} {
putserv "privmsg $chan :$nick, hello!"
return
}
}
bind pubm - "*hello*" my_talk_handler | dont know why you have $text in the output, unless you wanted it there if ya did just re-add it. but i've removed it.
Edit: fixed type'o should of been pubm, thanks for pointing that out. _________________ TCL the misunderstood
Last edited by TCL_no_TK on Fri Sep 21, 2007 6:36 pm; edited 1 time in total |
|
| Back to top |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
Posted: Fri Sep 21, 2007 9:07 am Post subject: |
|
|
There's not much difference between both codes (+ you can't use wildcards with pub binds, you meant pubm).
@devil_i
Could it possible be that your bot is ignoring your friend or everybody for some reason? _________________ Follow me on GitHub
- Opposing
Public Tcl scripts |
|
| Back to top |
|
 |
devil_i Voice
Joined: 20 Sep 2007 Posts: 4
|
Posted: Fri Sep 21, 2007 9:40 am Post subject: |
|
|
hm.. i don't think so.
if i want my bot ignore somebody i must write it in a code, right?
but i don't write in a code anything that refer to it.
P.S. one little thing to.
today when i was testing it again i runed windrop, said hello to bot he answered to me, then i said hello from computer where freebsd was instaled, bot again answered to me. i thinked that it is working.
i say to my friend to test the bot again but there was nothing new.
(i think it is obvious that computer with windows and computer with freebsd are in the home network) |
|
| Back to top |
|
 |
Alchera Revered One

Joined: 11 Aug 2003 Posts: 3344 Location: Ballarat Victoria, Australia
|
Posted: Fri Sep 21, 2007 9:49 am Post subject: |
|
|
If your friend is using colours he will be ignored also.
You can check if the bot is ignoring anyone by using the following in DCC:
_________________ Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM |
|
| Back to top |
|
 |
devil_i Voice
Joined: 20 Sep 2007 Posts: 4
|
Posted: Tue Sep 25, 2007 7:36 am Post subject: |
|
|
well
thank you guys... its now working normally
the cause of the problem was colours |
|
| Back to top |
|
 |
|