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.

this qnet auth script

Old posts that have not been replied to for several years.
Locked
m
mia_richard
Voice
Posts: 25
Joined: Sun Aug 31, 2003 9:29 am

this qnet auth script

Post by mia_richard »

Code: Select all

set authnick "myauth"
set authkey "myauthpw"

bind dcc m qauth qauth
bind raw - 001 qauth

proc qauth {nick host hand args} {
   global authnick authkey
   putserv "PRIVMSG Q@CServe.quakenet.org :auth $authnick $authkey"
}

What means the bind dcc m qauth qauth (for what)

thank you
m
mortician
Voice
Posts: 37
Joined: Sun Sep 22, 2002 6:35 pm
Location: Tsjakamaka
Contact:

Post by mortician »

the bind dcc creates a partyline command, when you type .qauth in the pline your bot will auth ...

However, if I'm not mistaking, your proc has too many parameters, it should be like

proc qauth {handle idx text} { ...
It is a mistake to think you can solve any major problems just with potatoes.
e
egghead
Master
Posts: 481
Joined: Mon Oct 29, 2001 8:00 pm
Contact:

Re: this qnet auth script

Post by egghead »

richard wrote:

Code: Select all

set authnick "myauth"
set authkey "myauthpw"

bind dcc m qauth qauth
bind raw - 001 qauth

proc qauth {nick host hand args} {
   global authnick authkey
   putserv "PRIVMSG Q@CServe.quakenet.org :auth $authnick $authkey"
}

What means the bind dcc m qauth qauth (for what)


thank you
There are 5 items in that sentence:
bind : command creating a binding
dcc : type of binding is partyline (DCC)
m : flag of the user that will trigger the binding (m = master)
quath : the command the user must give to trigger the binding. Note that commands on the partyline are preceeded by a dot (.)
qauth : the name of the procedure that is called if the binding is triggered.

So, it means a binding to a command given on the partyline (DCC).
If a master (flag m) types ".qauth" on the partyline, the procedure named "qauth" is called.

You can also check docs/tcl-commands.doc for further info on bindings.
(2) DCC
bind dcc <flags> <command> <proc>
procname <handle> <idx> <text>

Description: used for partyline commands; the command is the first
word and everything else becomes the text argument. The idx is
valid until the user disconnects. After that, it may be reused,
so be careful about storing an idx for long periods of time.
Module: core
edit: heh didn't notice mortician already answered.
m
mia_richard
Voice
Posts: 25
Joined: Sun Aug 31, 2003 9:29 am

Post by mia_richard »

thank you (both)
Locked