- Joined
- Feb 18, 2007
- Messages
- 21
- Reaction score
- 0
Hello,
I've been working on a unban command but I don't seem to get it working ^^
This is the ban command, but now I want a /unban too.
I noticed I needed to change something with
Since this one picks the online characters.
Could anyone help?
Thanks.
I've been working on a unban command but I don't seem to get it working ^^
Code:
}
if (Splitter[0] == "/ban")
{
foreach (DictionaryEntry DE in World.AllChars)
{
Character Char = (Character)DE.Value;
if (Char.Name == Splitter[1])
{
World.SendMsgToAll(Splitter[1] + " has been banned by " + MyChar.Name, "SYSTEM", 2011);
ExternalDatabase.DatabaseQueue.Enqueue(new MySqlCommand("UPDATE `Accounts` SET `LogonType` = 3 WHERE `Charr` = '"+ Splitter[1] +"'", ExternalDatabase.Connection));
Char.MyClient.Drop();
}
else
{
SendPacket(General.MyPackets.SendMsg(MessageId, "SYSTEM", MyChar.Name, "Sorry the Character:" + Splitter[1] + " is offline...Please try again later", 2000));
}
}
This is the ban command, but now I want a /unban too.
I noticed I needed to change something with
Code:
foreach (DictionaryEntry DE in World.AllChars)
Since this one picks the online characters.
Could anyone help?
Thanks.