Code is a simple on text event with if statements and write/$read statements.

Code:
on *:text:!register &:?: {
  write users.txt $nick $2
}
on *:text:!login &:?: {
  if ($read(users.txt,s,$nick) == $2) {
    commands to mark user as logged in (variable maybe)
  }
}


Use /help /write and /help $read (actually, both are the same help file) to see how to use those properly.

Note that I used ? so that these commands only work in a query window. I also used & in the trigger to indicate that a word must be there rather than using if ($2 != $null).

NOTE: This is an example. I am not including checks to make sure people don't register multiple times (if they do so, they can only login with the first password in the current script). You need to learn to add error checking and writing scripts yourself as we can't provide every script you ask for. We're here to help explain how, not to do it for you. I've done a lot for you to be nice, but it's getting to about time for you to start doing it yourself and then asking for help when you can't make your own script work the way you want it to. Then, you provide what you've already written and we can help you to fix it rather than us doing everything for you. smile

Last edited by Riamus2; 23/09/05 06:15 PM.

Invision Support
#Invision on irc.irchighway.net