commit
98711bd05c
2 changed files with 10 additions and 7 deletions
|
|
@ -1,4 +1,4 @@
|
|||
/*
|
||||
/*
|
||||
TShock, a server mod for Terraria
|
||||
Copyright (C) 2011 The TShock Team
|
||||
|
||||
|
|
@ -704,15 +704,18 @@ namespace TShockAPI
|
|||
if (TShock.Bans.RemoveBan(ban.IP))
|
||||
args.Player.SendMessage(string.Format("Unbanned {0} ({1})!", ban.Name, ban.IP), Color.Red);
|
||||
else
|
||||
args.Player.SendMessage(string.Format("Failed to Unbanned {0} ({1})!", ban.Name, ban.IP), Color.Red);
|
||||
args.Player.SendMessage(string.Format("Failed to unban {0} ({1})!", ban.Name, ban.IP), Color.Red);
|
||||
}
|
||||
else if (!TShock.Config.EnableBanOnUsernames)
|
||||
{
|
||||
ban = TShock.Bans.GetBanByIp(plStr);
|
||||
if (TShock.Bans.RemoveBan(ban.IP))
|
||||
|
||||
if (ban == null)
|
||||
args.Player.SendMessage(string.Format("Failed to unban {0}, not found.", args.Parameters[0]), Color.Red);
|
||||
else if (TShock.Bans.RemoveBan(ban.IP))
|
||||
args.Player.SendMessage(string.Format("Unbanned {0} ({1})!", ban.Name, ban.IP), Color.Red);
|
||||
else
|
||||
args.Player.SendMessage(string.Format("Failed to Unbanned {0} ({1})!", ban.Name, ban.IP), Color.Red);
|
||||
args.Player.SendMessage(string.Format("Failed to unban {0} ({1})!", ban.Name, ban.IP), Color.Red);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -781,7 +784,7 @@ namespace TShockAPI
|
|||
if (TShock.Bans.RemoveBan(ban.IP))
|
||||
args.Player.SendMessage(string.Format("Unbanned {0} ({1})!", ban.Name, ban.IP), Color.Red);
|
||||
else
|
||||
args.Player.SendMessage(string.Format("Failed to Unbanned {0} ({1})!", ban.Name, ban.IP), Color.Red);
|
||||
args.Player.SendMessage(string.Format("Failed to unban {0} ({1})!", ban.Name, ban.IP), Color.Red);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/*
|
||||
/*
|
||||
TShock, a server mod for Terraria
|
||||
Copyright (C) 2011 The TShock Team
|
||||
|
||||
|
|
@ -125,7 +125,7 @@ namespace TShockAPI.DB
|
|||
{
|
||||
try
|
||||
{
|
||||
return database.Query("DELETE FROM Bans WHERE IP=@ip", ip) != 0;
|
||||
return database.Query("DELETE FROM Bans WHERE IP=@0", ip) != 0;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue