Introduction
This is very basic, what it will do is upon login. It will send a code with that packet checking if that code is the same on the client as on the server. The code can be as long as you wish it to be.
Do not use the same security code as on this example.
Client Side
Find:
Code:
Sub SendLogin(ByVal Name As String, ByVal Password As String)
Dim Packet As String
Packet = "login" & SEP_CHAR & Trim(Name) & SEP_CHAR & Trim(Password) & SEP_CHAR & App.Major & SEP_CHAR & App.Minor & SEP_CHAR & App.Revision & SEP_CHAR & END_CHAR
Call SendData(Packet)
End Sub
Then add this part to it:
Code:
& SEP_CHAR & "code35FO36F"
So it eventually look like this:
Code:
Sub SendLogin(ByVal Name As String, ByVal Password As String)
Dim Packet As String
Packet = "login" & SEP_CHAR & Trim(Name) & SEP_CHAR & Trim(Password) & SEP_CHAR & App.Major & SEP_CHAR & App.Minor & SEP_CHAR & App.Revision & SEP_CHAR & "code35FO36F" & SEP_CHAR & END_CHAR
Call SendData(Packet)
End Sub
Server SideInside:
Code:
' ::::::::::::::::::
' :: Login packet ::
' ::::::::::::::::::
If LCase(Parse(0)) = "login" Then
Just below:
Code:
If IsMultiAccounts(Name) Then
Call AlertMsg(Index, "Multiple account logins is not authorized.")
Exit Sub
End If
Add:
Code:
If Trim$(Parse$(6)) <> "code35FO36F" Then
Call AlertMsg(Index, "Your client do not match the servers security code.")
Exit Sub
End If
Yes I know it's very basic. But it's always something.