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.

a tcl script to make +o users identify when they join channe

Old posts that have not been replied to for several years.
K
KrE80r
Voice
Posts: 18
Joined: Thu Jun 05, 2003 10:34 am

a tcl script to make +o users identify when they join channe

Post by KrE80r »

pls if any1 knwo such script:
i want a script to make +o users identify when they join the channel immeditaly and they cant do any pubcmds or anything before they identify to this tcl any1 know something like this pls??
User avatar
stdragon
Owner
Posts: 959
Joined: Sun Sep 23, 2001 8:00 pm
Contact:

Post by stdragon »

Actually you will have to modify your pubcmds script rather than use another script. Find the places that check for the +o flag and change it to check for another flag like +A (or any capital letter you want). Then you need a simple auth procedure that gives the user +A when they identify.

I suppose you could keep using +o, but that means you have to take away the +o flag from all your users, since they can only get it temporarily when they identify. You probably don't want to do that.
K
KrE80r
Voice
Posts: 18
Joined: Thu Jun 05, 2003 10:34 am

Post by KrE80r »

well infact y i need so?
i have a trivia.tcl running
it runs using !start command
which is enabled for +o users only
so other users do what they cahnge into a +o user nick and quickly type :
!start and then change the nick back so they run the trivia thats it y i need such tcl to identify to bot when u enter the channel immdeitaly
any other ideas??
K
KrE80r
Voice
Posts: 18
Joined: Thu Jun 05, 2003 10:34 am

Post by KrE80r »

well infact y i need so?
i have a trivia.tcl running
it runs using !start command
which is enabled for +o users only
so other users do what they cahnge into a +o user nick and quickly type :
!start and then change the nick back so they run the trivia thats it y i need such tcl to identify to bot when u enter the channel immdeitaly
any other ideas??
User avatar
stdragon
Owner
Posts: 959
Joined: Sun Sep 23, 2001 8:00 pm
Contact:

Post by stdragon »

It sounds like the easiest thing is to change the start command. Get rid of the public !start command and make it a message command instead. It should be like, /msg bot !start yourpassword. That way, only +o users can use it, but even then they have to supply their passwords.
K
KrE80r
Voice
Posts: 18
Joined: Thu Jun 05, 2003 10:34 am

Post by KrE80r »

well man its cool but how its not my script how to make it ask for password
i think i can cahnge
bind pub $tgflagsstart $tgcmdstart tgstart into
bind msg $tgflagsstart $tgcmdstart tgstart

nut how to ask for the password?? with the command??
User avatar
stdragon
Owner
Posts: 959
Joined: Sun Sep 23, 2001 8:00 pm
Contact:

Post by stdragon »

That's right for the first step. Now you have to modify the tgstart procedure. First of all, the arguments change (no channel). Check tcl-commands.doc for the correct arguments. The password will be in the last argument. Read tcl-commands.doc for help on how to validate the password.
K
KrE80r
Voice
Posts: 18
Joined: Thu Jun 05, 2003 10:34 am

Post by KrE80r »

sorry for being lame but pls tell me how can i cahnge it
here is the proc

proc tgstart {nick host hand chan text}
what shall i add or remove man???
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

What you've pasted is the proc. What you should be modifing is the bind. Also, read and folow stdragon sugestions. They have great value.. :P
Once the game is over, the king and the pawn go back in the same box.
K
KrE80r
Voice
Posts: 18
Joined: Thu Jun 05, 2003 10:34 am

Post by KrE80r »

well caesar :
i just wanna this !start proc asks for password also
here is what i added :
#starts the game if it isn't running.
proc tgstart {nick uhost hand arg} {
set pass [lindex $arg 0]
if {[passwdok $handle $pass]} {



dont think it will work but hmm try to help me out
User avatar
stdragon
Owner
Posts: 959
Joined: Sun Sep 23, 2001 8:00 pm
Contact:

Post by stdragon »

You're doing great so far. You can get rid of the lindex part, because $arg will be the password already (it's not a list). After that, try testing it.
User avatar
Papillon
Owner
Posts: 724
Joined: Fri Feb 15, 2002 8:00 pm
Location: *.no

Post by Papillon »

or make it look like this...

Code: Select all

set pass [lindex [split $arg] 0]
Elen sila lúmenn' omentielvo
K
KrE80r
Voice
Posts: 18
Joined: Thu Jun 05, 2003 10:34 am

Post by KrE80r »

well it is asking for the variable chan which i removed based on ur request stdragon
the error is
Tcl error [tgstart]: can't read "chan": no such variable

so shall i return it back??
K
KrE80r
Voice
Posts: 18
Joined: Thu Jun 05, 2003 10:34 am

Post by KrE80r »

hmm i added back variable chan i get
Tcl error [tgstart]: no value given for parameter "arg" to "tgstart"

hmm wanna me send u the file ?
User avatar
Papillon
Owner
Posts: 724
Joined: Fri Feb 15, 2002 8:00 pm
Location: *.no

Post by Papillon »

paste the tgstart proc in here please :)
Elen sila lúmenn' omentielvo
Locked