How save the account?

01/10/2010 20:32 .Kob#1
I'm makin a command for ban ppl, here is:

Code:
if (Cmd[0] == "/ban")
                            {
                                Game.Character C = Game.World.CharacterFromName(Cmd[1]);
                                if (C != null)
                                C.MyClient.AuthInfo.Status = "[ban]";
                                C.MyClient.Disconnect();
                             }
But, if the infractor log of, he have normal status again.

How i can save the status when i change it?

P.S = Sorry for the english lol. I'm spanish.
01/10/2010 21:45 pro4never#2
Not having used the source I can't be super specific but I'd simple look for other areas in the source that the character/account info is updated. I know in coemu/cofuture and other sources using mysql it would be something like Database.Database.SaveCharacter but seeing as this source is using a text/ini file to store the data (assuming) there should still be something similar in the source basically writing the new data to the file.

Main things I'd check is character creation or first login (first login should be setting password so that would definitely need to save info to the account table)

Good luck.
01/10/2010 23:23 .Kob#3
Thanks guy i find this in Database:

SaveCharacter(C, Account);

But in chat.cs i need rename Account for idk:

Database.SaveCharacter(C, Account);

#Edit: Maybe is:

Database.SaveCharacter(C, C.MyClient.AuthInfo.Account);

#2nd Edit: This not work but no give error:

if (Cmd[0] == "/ban")
{
Game.Character C = Game.World.CharacterFromName(Cmd[1]);
if (C != null)
C.MyClient.AuthInfo.Status = "[ban]";
Database.SaveCharacter(C, C.MyClient.AuthInfo.Account);

}
05/05/2012 20:00 freeman56#4
I'm don't knowing
05/05/2012 21:47 tkblackbelt#5
Quote:
Originally Posted by freeman56 View Post
I'm don't knowing
Thank you for the most high quality and knowledgeable answer I've every seen.