mIRC Home    About    Download    Register    News    Help

Print Thread
#5157 06/01/03 12:15 AM
Joined: Dec 2002
Posts: 397
A
ATMA Offline OP
Fjord artisan
OP Offline
Fjord artisan
A
Joined: Dec 2002
Posts: 397
can i make this script any better??????????
Code:
 on *:text:register*:?: {
  var %register = "registered.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) && ($3 !isin %register) {
    .invite $nick #
    .write %register $nick $2
    .notice $nick Thank you for registering.
    .notice $nick Notice: Your password is $2 remember this for later use.
  }
  elseif ($nick isin %register) && ($3 isin %register) {
    .notice $nick Error: Nick all ready registered please pick another nick.
    .notice $nick Usage: register <password>
  }
}
 



Need amazing web design for low price: http://www.matrixn3t.net
#5158 06/01/03 12:42 AM
Joined: Dec 2002
Posts: 2,809
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 2,809
Use a hash table instead of a regular text file.

#5159 06/01/03 12:50 AM
Joined: Dec 2002
Posts: 397
A
ATMA Offline OP
Fjord artisan
OP Offline
Fjord artisan
A
Joined: Dec 2002
Posts: 397
also as i was testing this script i have found an error if i register and even if the nick is all ready registered it still will do the part where it writes to the file idk whats with it also wtf if a hash table confused


Need amazing web design for low price: http://www.matrixn3t.net
#5160 06/01/03 01:27 AM
Joined: Dec 2002
Posts: 397
A
ATMA Offline OP
Fjord artisan
OP Offline
Fjord artisan
A
Joined: Dec 2002
Posts: 397
i have changed the script a bit and i still get the same results but...
when ever i register and i get the message -
+7:57:50p -WebBot- Thank you for registering.
+7:57:50p -WebBot- Notice: Your password is testing remember this for later use.
even though i am registered it still doesnt find my nick in the txt file heres the new script -

Code:
 
on *:text:register*:?: {
  var %register = "registered.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.
    goto end
  }
  elseif ($nick isin %register) {
    .notice $nick 4Error: Nick all ready registered please pick another nick.
    .notice $nick Usage: register <password>
    goto end
  }
  elseif ($nick !isin %register) {
    .invite $nick #
    .write %register $nick $2
    .notice $nick Thank you for registering.
    .notice $nick Notice: Your password is $2 remember this for later use.
  }
  else {
    .notice $nick Error: nick all ready registered please pick another nick.
  }
  :end
}


Need amazing web design for low price: http://www.matrixn3t.net
#5161 06/01/03 01:33 AM
Joined: Dec 2002
Posts: 395
M
Fjord artisan
Offline
Fjord artisan
M
Joined: Dec 2002
Posts: 395
if ($nick isin %register) would not work, it just checks if "nick" is in the WORD "registered.txt". /help $read.
I'd suggest to use .ini file or hash tables, read the help file for info.

btw. you don't need those ugly goto's.

#5162 06/01/03 01:43 AM
Joined: Dec 2002
Posts: 397
A
ATMA Offline OP
Fjord artisan
OP Offline
Fjord artisan
A
Joined: Dec 2002
Posts: 397
yes i found this out too i am trying to find out how to do it now


Need amazing web design for low price: http://www.matrixn3t.net

Link Copied to Clipboard