25-12-2008, 02:23 AM
This is my login packet... please let me know if there is something screwed here.
[code] ' ::::::::::::::::::
' :: Login packet ::
' ::::::::::::::::::
If LCase(Parse(0)) = "login" Then
If Not IsPlaying(index) And Not IsLoggedIn(index) Then
' Get the data
Name = Parse(1)
Password = Parse(2)
' Check versions
If Val(Parse(3)) < CLIENT_MAJOR Or Val(Parse(4)) < CLIENT_MINOR Or Val(Parse(5)) < CLIENT_REVISION Then
Call AlertMsg(index, "Version outdated, please visit http://mirage.katami.com")
Exit Sub
End If
If Len(Trim(Name)) < 3 Or Len(Trim(Password)) < 3 Then
Call AlertMsg(index, "Your name and password must be at least three characters in length")
Exit Sub
End If
If Not AccountExist(Name) Then
Call AlertMsg(index, "That account name does not exist.")
Exit Sub
End If
If Not PasswordOK(Name, Password) Then
Call AlertMsg(index, "Incorrect password.")
Exit Sub
End If
If IsMultiAccounts(Name) Then
Call AlertMsg(index, "Multiple account logins is not authorized.")
Exit Sub
End If
' Prevent Dupeing
For i = 1 To Len(Name)
n = Asc(Mid(Name, i, 1))
If (n >= 65 And n = 97 And n = 48 And n
[code] ' ::::::::::::::::::
' :: Login packet ::
' ::::::::::::::::::
If LCase(Parse(0)) = "login" Then
If Not IsPlaying(index) And Not IsLoggedIn(index) Then
' Get the data
Name = Parse(1)
Password = Parse(2)
' Check versions
If Val(Parse(3)) < CLIENT_MAJOR Or Val(Parse(4)) < CLIENT_MINOR Or Val(Parse(5)) < CLIENT_REVISION Then
Call AlertMsg(index, "Version outdated, please visit http://mirage.katami.com")
Exit Sub
End If
If Len(Trim(Name)) < 3 Or Len(Trim(Password)) < 3 Then
Call AlertMsg(index, "Your name and password must be at least three characters in length")
Exit Sub
End If
If Not AccountExist(Name) Then
Call AlertMsg(index, "That account name does not exist.")
Exit Sub
End If
If Not PasswordOK(Name, Password) Then
Call AlertMsg(index, "Incorrect password.")
Exit Sub
End If
If IsMultiAccounts(Name) Then
Call AlertMsg(index, "Multiple account logins is not authorized.")
Exit Sub
End If
' Prevent Dupeing
For i = 1 To Len(Name)
n = Asc(Mid(Name, i, 1))
If (n >= 65 And n = 97 And n = 48 And n