mIRC Homepage
Posted By: ATMA login proggy -_- not working - 08/01/03 03:04 AM
ok i made this script -
Code:
on *:text:register*:?: {
  var %register = $read(register.txt)
  if (!$2) {
    notice $nick Error: Please specify your password.
    notice $nick Usage: regsiter <password>
    notice $nick Notice: You must use this nick when you come back to this server.
  }
  elseif ($nick isin %register) {
    notice $nick Error: Nick all ready registered please pick another nick.
    notice $nick Usage: register <password>
  }
  elseif ($nick !isin %register) {
    write register.txt $nick $2
    notice $nick Thank you for registering.
    notice $nick Notice: Your password is $2 remember this for later use.
    notice $nick Notice: To login type: /msg $me login <password>
  }
}

this script works now i just want this one to work with it -
Code:
on *:text:login*:?: {
  var %register = $read(registered.txt)
  var %online = $read(online.txt)
  if (!$2) {
    notice $nick Error: Please specify your password.
    notice $nick Usage: login <password>
  }
  elseif ($nick isin %register) && ($2 isin %register) {
    write %online $nick
    notice $nick Welcome back $nick $+ .
    notice $nick Please idel in #FutureWeb
  }
  elseif ($nick !isin %register) && ($2 !isin %register) {
    notice $nick Error: Nickname or password incorect.
    notice $nick Usage: login <password>
  }
}

idk whats wrong with the login one its really irtating me -_-
confused :tongue:
Posted By: MonoSex Re: login proggy -_- not working - 08/01/03 03:11 AM
$read(file) reads a _random_ line from a file.
Posted By: acemiles_ed Re: login proggy -_- not working - 08/01/03 04:52 AM
Try $read(file, s, $nick) or $read(file, w, $nick)
Posted By: lambroger Re: login proggy -_- not working - 08/01/03 05:33 AM
also make sure you have spaces around all operators and parenthesis.

not doing that causes the most wicked errors.

also, check your main status window, mirc will list errored lines in that window.
Posted By: ATMA Re: login proggy -_- not working - 08/01/03 11:16 AM
i tired the , w, $nick) still doesnt work right it gives sends me the error -
+6:14:37a -WebBot- Error: Nickname or password incorect.
+6:14:38a -WebBot- Usage: login <password>
i still cant figur it out
Posted By: KingTomato Re: login proggy -_- not working - 08/01/03 11:26 PM
Out of curiosity, why not use an INI file, and make maters eaier? If you are geared toward a hard file for saving the data, but wtill want the reverance ability, just use an INI file.

Quick and easy as $readini(users.ini, Users, $nick)

If the result is $null, they are not registered, else they are and the value holds the password.

-KingTomato
http://www.kingtomato.com/
AIM: otamoTgniK
Posted By: amr Re: login proggy -_- not working - 17/01/03 07:18 PM
I believe you have set the variables to read different text files

the register one uses register.txt, however, the login one uses registered.txt

hope this works smile
© mIRC Discussion Forums