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.

Help cm Register Nick

Old posts that have not been replied to for several years.
Locked
L
Lph
Voice
Posts: 12
Joined: Mon Nov 22, 2004 11:21 am

Help cm Register Nick

Post by Lph »

i want to using public cm !regnick Nick Password Email to register nick through my Eggdrop
in password i want it must be over 5 character and in email i want to have @ .if it true my bot will register nick for user and else if password less 5 char it say :"your password less 5 char " if the email not has @ my bot will say:" your email is incorrect.."

What i can do this ?
m
metroid
Owner
Posts: 771
Joined: Wed Jun 16, 2004 2:46 am

Post by metroid »

I'll play nice

Code: Select all

bind PUB n|- !regnick pub:regnick

proc regnick { nickname hostname handle channel arguments } {
set nick [lindex [split $arguments] 0]
set password [lindex [split $arguments] 1]
set email [lindex [split $arguments] 2]
if {$nick == "" || $password == "" || $email == ""} {
putquick "NOTICE $nickname :Not enough arguments."
return 0
}
if {[string length $password] < 5} {
putquick "NOTICE $nickname :The password isn't long enough"
return 0
}
if {![string match -nocase "*@*" $email]} {
putquick "NOTICE $nickname :Invalid email adress."
return 0
}
##DO YOUR STUFF
}
This should work i guess, as always it's untested so if it doesn't work, Show me the error
L
Lph
Voice
Posts: 12
Joined: Mon Nov 22, 2004 11:21 am

Post by Lph »

thank you .It have been worked. but in
proc regnick { nickname hostname handle channel
I fix is...
proc pub:regnick { nickname hostname handle channel
thank for your help
m
metroid
Owner
Posts: 771
Joined: Wed Jun 16, 2004 2:46 am

Post by metroid »

oops! :oops:
Locked