Im trying to set some user information at the same time as adding them to the bot.
im using the code:
setuser $newhand EMAIL $email
but when the user tries to register with the bot i see the error:
<H4> [02:31] Tcl error [handle_reg]: No such info type: EMAIL
i took the command out of tcl-commands.dos which says
EMAIL - returns the user's e-mail address
setuser <handle> <entry-type> [extra info]
Description: this is the counterpart of getuser. It lets you set the
various values. Other then the ones listed below, the entry-types are
the same as getuser's.
so i cant really see what im doing wrong. The same syntax worked to add the users password.
The email type only appears when you have a certain module loaded, I think (I forget which). You're best off using the XTRA field since it's always available.
You can use the string command to do a match like that, however, using regexp will give better results.
With this, you can use one of the readily available reg expressions available. They will check for the use of valid characters, and format, not just the requirmen of the @ and .
thanks, could someone point me in the direction of a regexp tutorial or something similar as i havnt come across it in any of the tcl tutiorials ive looked through yet.
Ive read through that. Cant say it made a great deal of sense heh.
Ive worked out simple matching such as
regexp {[0,1]} $blah
matching just those 2 numbers etc, but i cant work out how to get it to match an email address, so it would only accept blah@blah.blah, and check for invalid characters at the same time.