Thanks ppslim. I've changed the part proc. Here's the code of '/msg $botnick auth <nick> <pass>'. Is there anyway I can set a database (which is written to a file) and record the exact time the user auth? I'm not sure how to go about doing it.
First of all, your "gets" line is incorrect. Read the man page at http://www.scriptics.com or tcl.activestate.com for information on the proper syntax.
About your question... you could use the "split" command, or you could change the database format. Instead of putting all the data on one line, why not split it up like:
nick
uhost
time
[blank line]
nick
uhost
time
Another option would be to separate the fields by tabs instead of spaces, so that you can do [split $line t]. That is preferable to the normal split command, because some of your fields (time) include spaces.
if {[getuser $authhand XTRA auth] == 2} {
puthelp "NOTICE $nick :You are already authenticated."
return 0
}
This would prevent the user from '/msg $botnick auth <handle> <password>' twice. Is there anyway I can make it such that if the user has already auth and it trying to auth from the same host, the bot would give the above syntax. However if the user is from a different host (clones) and tries to auth, it will allow the user to auth?
<font size=-1>[ This Message was edited by: stafford on 2002-01-11 02:17 ]</font>
Though I managed to write data into file auth.data.db, it seems that if a different "handle" auth him/herself, it would overwrite other handles. Which means that the file would only contain 1 handle details. Any solutions?