egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

problem:bot answer only to me

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Eggdrop Help
View previous topic :: View next topic  
Author Message
devil_i
Voice


Joined: 20 Sep 2007
Posts: 4

PostPosted: Thu Sep 20, 2007 2:22 pm    Post subject: problem:bot answer only to me Reply with quote

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
View user's profile Send private message
TCL_no_TK
Owner


Joined: 25 Aug 2006
Posts: 509
Location: England, Yorkshire

PostPosted: Thu Sep 20, 2007 10:17 pm    Post subject: Re: problem:bot answer only to me Reply with quote

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
View user's profile Send private message Send e-mail
devil_i
Voice


Joined: 20 Sep 2007
Posts: 4

PostPosted: Fri Sep 21, 2007 2:49 am    Post subject: Reply with quote

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
View user's profile Send private message
TCL_no_TK
Owner


Joined: 25 Aug 2006
Posts: 509
Location: England, Yorkshire

PostPosted: Fri Sep 21, 2007 3:00 am    Post subject: RE: problem:bot answer only to me Reply with quote

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 Confused 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
View user's profile Send private message Send e-mail
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Fri Sep 21, 2007 9:07 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
devil_i
Voice


Joined: 20 Sep 2007
Posts: 4

PostPosted: Fri Sep 21, 2007 9:40 am    Post subject: Reply with quote

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
View user's profile Send private message
Alchera
Revered One


Joined: 11 Aug 2003
Posts: 3344
Location: Ballarat Victoria, Australia

PostPosted: Fri Sep 21, 2007 9:49 am    Post subject: Reply with quote

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:
.ignores

_________________
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
Back to top
View user's profile Send private message Visit poster's website
devil_i
Voice


Joined: 20 Sep 2007
Posts: 4

PostPosted: Tue Sep 25, 2007 7:36 am    Post subject: Reply with quote

well
thank you guys... its now working normally
the cause of the problem was colours
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Eggdrop Help All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber