Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2 > CO2 Private Server
You last visited: Today at 00:12

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Problem with public static byte Authenticate

Discussion on Problem with public static byte Authenticate within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
macht102's Avatar
 
elite*gold: 0
Join Date: Jul 2008
Posts: 36
Received Thanks: 1
Problem with public static byte Authenticate

database.cs line 1498

public static byte Authenticate(string UserName, string Password)
{
try
{
MySqlDataAdapter DataAdapter = new MySqlDataAdapter("SELECT * FROM `Accounts` WHERE `AccountID` = '" + UserName + "'", Connection);
DataSet DSet = new DataSet();

DataAdapter.Fill(DSet, "Account");

if (DSet != null && DSet.Tables["Account"].Rows.Count > 0) <-----1498
{
DataRow DR = DSet.Tables["Account"].Rows[0];

string Pass = (string)DR["Password"];
if (Pass == Password || Pass == "")
{
if (Pass == "")
{
MySqlCommand Command = new MySqlCommand("UPDATE `Accounts` SET `Password` = '" + Password + "' WHERE `AccountID` = '" + UserName + "'", Connection);
Command.ExecuteNonQuery();
}

uint LogonCount = (uint)DR["LogonCount"];
LogonCount++;

MySqlCommand Comm = new MySqlCommand("UPDATE `Accounts` SET `LogonCount` = " + LogonCount + " WHERE `AccountID` = '" + UserName + "'", Connection);
Comm.ExecuteNonQuery();

return Convert.ToByte((uint)DR["LogonType"]);
}
else
return 0;
}
else
return 0;
}
catch (Exception Exc) { General.WriteLine(Exc.ToString()); return 0; }
}

Not sure whats causing it, it just happens randomly and then no one can login.
i dont think its the login freeze, iv tried that already.

im using LOTF source 5017
macht102 is offline  
Old 06/10/2010, 08:25   #2
 
elite*gold: 0
Join Date: Oct 2009
Posts: 128
Received Thanks: 50
You haven't told us what the problem is. In the future, format your code using the code tags.
s.bat is offline  
Reply


Similar Threads Similar Threads
sorc problem (static) beim d2nt
07/04/2010 - Diablo 2 - 2 Replies
yo hab in der suchfunktion nichts gefunden, habe folgenden fehler mit meiner sorc: blablapfad:scripts/libs/common/NTAttack.ntl (604) : ReferenceError: NTConfig_CastStatic is not defined hier ma der abschnitt in der besagten datei: return 3; }
[Visual C#] von public static void richtextbox in einer Form steuern
06/12/2010 - .NET Languages - 2 Replies
Hallo liebe Coders Erstmal vielen Dank das ihr immer so fleißig helft.. Ich hab mal wieder ein neues Problem: public static void txtboxaktu() { Form1 f1 = new Form1(); f1.richTextBox2Form1.Text = "test";
[Help]Authenticate
02/08/2010 - CO2 Private Server - 0 Replies
trying to get the 5165 to use mysql but i cant get the auth to work theres alot of stuff in the source already to deal with auth and i'm not that good at C# can someone help me add me if ya want [email protected]
How to setup static ip+portforward+make server public nonhamachi
04/23/2009 - WoW Private Server - 1 Replies
Hey guys. I was looking around on the forum and saw that alot of people have problems port forwarding their router to make their server public nonhamachi so i decided to make a guide First we need to set up a static ip so you can open ports on your router. Go to start and find run then type cmd in the box and press enter. And you should have a little black window open. Now type in ipconfig /all and find your standard gateway Now write that down or keep the window open. Then go into...
How to setup static ip+portforward+make server public nonhamachi
04/21/2009 - WoW Private Server - 0 Replies
Hey guys. I was looking around on the forum and saw that alot of people have problems port forwarding their router to make their server public nonhamachi so i decided to make a guide First we need to set up a static ip so you can open ports on your router. Go to start and find run then type cmd in the box and press enter. And you should have a little black window open. Now type in ipconfig /all and find your standard gateway Now write that down or keep the window open. Then go into...



All times are GMT +2. The time now is 00:12.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.