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.

bind join/part proc never gets triggered

Help for those learning Tcl or writing their own scripts.
Post Reply
d
deuce
Voice
Posts: 2
Joined: Sat Nov 11, 2006 4:16 pm

bind join/part proc never gets triggered

Post by deuce »

hi,

I'm writing a small script, that has to put some information about a user into a database when he joins a channel and erase these information when he leaves it. so I used some code like this:

Code: Select all

set channel #channel

bind join - "$channel *" on_join
bind part - "$channel *" on_part
bind sign - "$channel *" on_sign
bind kick - "$channel *" on_kick
bind nick - "$channel *" on_nickchange

proc on_join {nick uhost hand chan} {
...
}

proc on_part {nick uhost hand chan {msg ""}} {
...
}

...
but none of these bindings is triggered when a user is joining or parting. the procedures for kicks, nickchanges and signoffs don't work either, although I've build the procedures like it's said in the eggdrop documentation.
eggdrop is as of version 1.6.18

is there any setting in the config or somewhere else, which could cause this or am I doing something wrong in the code?
User avatar
rosc2112
Revered One
Posts: 1454
Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania

Post by rosc2112 »

tcl-commands.doc BINDS:
( 8 ) JOIN (stackable)
bind join <flags> <mask> <proc>
procname <nick> <user@host> <handle> <channel>

Description: triggered by someone joining the channel. The mask in
the bind is matched against "#channel nick!user@host" and can
contain wildcards.
Module: irc
--
I've used this and not had a problem:
bind join - "$channel *!*@*" myproc

You need to use *!*@* for your masks, afaik.
d
deuce
Voice
Posts: 2
Joined: Sat Nov 11, 2006 4:16 pm

Post by deuce »

just tried it in the way you said...it doesn't work either :(

edit:
ok...I think I solved my problem...somehow the channel my bot was in didn't properly tell the bot that somebody joined or something like this...I switched the channel and now it works...
I'm lucky that the channel which didn't worked was just the test chan :D
E
Eckieck
Voice
Posts: 2
Joined: Fri Dec 01, 2006 1:28 pm

Post by Eckieck »

I seem to have exactly the same problem (using 1.6.18).

Using

Code: Select all

bind join - * avoj_join
#OR: bind join - "* *!*@*" avoj_join
#OR: bind join - "*" avoj_join
#OR: bind join - {*} avoj_join
proc avoj_join {nick uhost hand c} {
   putlog "DEBUG: $nick joined $c"
}
only gets triggered when my own bot (running this piece of code) enters a channel, not when someone else is joining the channel.

But after i remove a channel and re-add it (.-chan #testchannel and .+chan #testchannel) suddenly the bind gets triggered when someone is joining the channel - until i restart/rehash eggdrop..

Any ideas/hints? Searched the whole afternoon without success :/
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

Could be a network issue, did you choose the convenient network setting in you .conf file?
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

Which irc network are you using?
Some networks support "odd" features that sometimes causes your bot to loose track of channels...
Also, are you using any "extended" chars in your channel-name?

And for the bind-mask, "*" would match anything matched by "*!*@*".
NML_375
E
Eckieck
Voice
Posts: 2
Joined: Fri Dec 01, 2006 1:28 pm

Post by Eckieck »

Thx a lot, i really used the wrong network setting - for more than one year. You both saved me from going crazy :D
Post Reply