mIRC Home    About    Download    Register    News    Help

Topic Options
#5473 - 08/01/03 03:04 AM login proggy -_- not working
ATMA Offline
Fjord artisan

Registered: 10/12/02
Posts: 397
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:
_________________________
Need amazing web design for low price: http://www.matrixn3t.net

Top
#5474 - 08/01/03 03:11 AM Re: login proggy -_- not working
MonoSex Offline
Fjord artisan

Registered: 09/12/02
Posts: 395
Loc: Ireland
$read(file) reads a _random_ line from a file.

Top
#5475 - 08/01/03 04:52 AM Re: login proggy -_- not working
acemiles_ed Offline
Babel fish

Registered: 11/12/02
Posts: 83
Loc: Houston, TX
Try $read(file, s, $nick) or $read(file, w, $nick)
_________________________
Network Outages
Free Java Chat

Top
#5476 - 08/01/03 05:33 AM Re: login proggy -_- not working
lambroger Offline
Ameglian cow

Registered: 04/01/03
Posts: 44
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.

Top
#5477 - 08/01/03 11:16 AM Re: login proggy -_- not working
ATMA Offline
Fjord artisan

Registered: 10/12/02
Posts: 397
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
_________________________
Need amazing web design for low price: http://www.matrixn3t.net

Top
#5478 - 08/01/03 11:26 PM Re: login proggy -_- not working
KingTomato Offline
Planetary brain

Registered: 04/01/03
Posts: 3012
Loc: New Hampshire, USA
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
_________________________
-KingTomato

Top
#5479 - 17/01/03 07:18 PM Re: login proggy -_- not working
amr Offline
Pikka bird

Registered: 22/12/02
Posts: 16
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

Top