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.

problem:bot answer only to me

General support and discussion of Eggdrop bots.
Post Reply
d
devil_i
Voice
Posts: 4
Joined: Thu Sep 20, 2007 2:13 pm

problem:bot answer only to me

Post by devil_i »

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: Select all

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 ))
User avatar
TCL_no_TK
Owner
Posts: 509
Joined: Fri Aug 25, 2006 7:05 pm
Location: England, Yorkshire

Re: problem:bot answer only to me

Post by TCL_no_TK »

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.
d
devil_i
Voice
Posts: 4
Joined: Thu Sep 20, 2007 2:13 pm

Post by devil_i »

i changed code to

Code: Select all

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
User avatar
TCL_no_TK
Owner
Posts: 509
Joined: Fri Aug 25, 2006 7:05 pm
Location: England, Yorkshire

RE: problem:bot answer only to me

Post by TCL_no_TK »

Try:

Code: Select all

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.
Last edited by TCL_no_TK on Fri Sep 21, 2007 6:36 pm, edited 1 time in total.
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

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?
d
devil_i
Voice
Posts: 4
Joined: Thu Sep 20, 2007 2:13 pm

Post by devil_i »

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)
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

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:

Code: Select all

.ignores
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
d
devil_i
Voice
Posts: 4
Joined: Thu Sep 20, 2007 2:13 pm

Post by devil_i »

well
thank you guys... its now working normally
the cause of the problem was colours
Post Reply