Update some commands to new system.
This commit is contained in:
@@ -1745,12 +1745,16 @@ namespace Game
|
||||
|
||||
/// Ban an account or ban an IP address, duration will be parsed using TimeStringToSecs if it is positive, otherwise permban
|
||||
public BanReturn BanCharacter(string name, string duration, string reason, string author)
|
||||
{
|
||||
uint durationSecs = Time.TimeStringToSecs(duration);
|
||||
return BanAccount(BanMode.Character, name, durationSecs, reason, author);
|
||||
}
|
||||
|
||||
public BanReturn BanCharacter(string name, uint durationSecs, string reason, string author)
|
||||
{
|
||||
Player pBanned = Global.ObjAccessor.FindConnectedPlayerByName(name);
|
||||
ObjectGuid guid;
|
||||
|
||||
uint duration_secs = Time.TimeStringToSecs(duration);
|
||||
|
||||
// Pick a player to ban if not online
|
||||
if (!pBanned)
|
||||
{
|
||||
@@ -1771,7 +1775,7 @@ namespace Game
|
||||
|
||||
stmt = DB.Characters.GetPreparedStatement(CharStatements.INS_CHARACTER_BAN);
|
||||
stmt.AddValue(0, guid.GetCounter());
|
||||
stmt.AddValue(1, (long)duration_secs);
|
||||
stmt.AddValue(1, (long)durationSecs);
|
||||
stmt.AddValue(2, author);
|
||||
stmt.AddValue(3, reason);
|
||||
trans.Append(stmt);
|
||||
|
||||
Reference in New Issue
Block a user