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" problem...

Old posts that have not been replied to for several years.
Locked
D
Da_Monkey

Post by Da_Monkey »

Hello people

What type of "bind" is it when the detects himself being connected to the server...?

I explain, I want him doing stuff when he's just connected to the server.

Thankx for help
D
Da_Monkey

Post by Da_Monkey »

Woups

I'm talking about the bot... you guessed :wink:
P
Petersen
Owner
Posts: 685
Joined: Thu Sep 27, 2001 8:00 pm
Location: Blackpool, UK

Post by Petersen »

raw 001
D
Da_Monkey

Post by Da_Monkey »

How have to write that code with raw 001 ?

bind <???> - * my_proc

proc my_proc {nick host handle} {
...
}

Thanx for you help
P
Petersen
Owner
Posts: 685
Joined: Thu Sep 27, 2001 8:00 pm
Location: Blackpool, UK

Post by Petersen »

from doc/tcl-commands.doc
(17) RAW (stackable)
bind raw <flags> <keyword-mask> <proc>
procname <from> <keyword> <arg...>

previous versions of eggdrop required a special compile option to
enable this binding, but it's now standard; the mask is checked
against the keyword (either a numeric like "368" or a keyword like
"PRIVMSG"); from will be the server name or the source user (depending
on the keyword); flags are ignored; the order of the arguments is
identical to the order that the IRC server sends to the bot -- the
pre-processing only splits it apart enough to determine the keyword;
if the proc returns 1, eggdrop will not process the line any further
(THIS COULD CAUSE YOUR BOT TO BEHAVE ODDLY IN SOME CASES)
D
Da_Monkey

Post by Da_Monkey »

Thx dude

So I think this :

--
bind raw - 001 my_proc

proc my_proc {...}{
...
}
--

would be ok...
Just wondering, it'll be triggered only when he's connected, not when he's connecting, right ?

Bye
g
guppy
eggdrop engineer
Posts: 199
Joined: Mon Sep 24, 2001 8:00 pm
Location: Canada
Contact:

Post by guppy »

or read tcl-commands.doc and look for the evnt bind ..

bind evnt - init-server <proc>

bind raw seems to be a bit screwy right now so I dont recommend using it on numerics that the bot might use .. I'll fix this in 1.6.9

Jeff
Locked