mirror of
https://github.com/RaidMax/IW4M-Admin.git
synced 2025-06-11 15:52:25 -05:00
VERSION 1.1
CHANGELOG: -fixed ban sorting ( and an overlooked bug ) -added kicks and temp-bans to penalty list -bans are now named penalties -readded pubbans page http://127.0.0.1:1624/pubbans -updated RepZ profile link
This commit is contained in:
@ -38,7 +38,7 @@ namespace IW4MAdmin
|
||||
String Message = String.Format("^1WARNING ^7[^3{0}^7]: ^3{1}^7, {2}", E.Target.Warnings, E.Target.Name, E.Target.lastOffense);
|
||||
E.Owner.Broadcast(Message);
|
||||
if (E.Target.Warnings >= 4)
|
||||
E.Target.Kick("You were kicked for too many warnings!");
|
||||
E.Target.Kick("You were kicked for too many warnings!", E.Origin);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -65,7 +65,7 @@ namespace IW4MAdmin
|
||||
E.Target.lastOffense = SharedLibrary.Utilities.removeWords(E.Data, 1);
|
||||
String Message = "^1Player Kicked: ^5" + E.Target.lastOffense + " ^1Admin: ^5" + E.Origin.Name;
|
||||
if (E.Origin.Level > E.Target.Level)
|
||||
E.Target.Kick(Message);
|
||||
E.Target.Kick(Message, E.Origin);
|
||||
else
|
||||
E.Origin.Tell("You cannot kick " + E.Target.Name);
|
||||
}
|
||||
@ -90,7 +90,7 @@ namespace IW4MAdmin
|
||||
E.Target.lastOffense = SharedLibrary.Utilities.removeWords(E.Data, 1);
|
||||
String Message = "^1Player Temporarily Banned: ^5" + E.Target.lastOffense + "^7 (1 hour)";
|
||||
if (E.Origin.Level > E.Target.Level)
|
||||
E.Target.tempBan(Message);
|
||||
E.Target.tempBan(Message, E.Origin);
|
||||
else
|
||||
E.Origin.Tell("You cannot temp ban " + E.Target.Name);
|
||||
}
|
||||
@ -596,7 +596,7 @@ namespace IW4MAdmin
|
||||
return;
|
||||
}
|
||||
|
||||
Ban B = E.Owner.Bans.Find(b => b.npID.Equals(E.Target.npID));
|
||||
Penalty B = E.Owner.Bans.Find(b => b.npID.Equals(E.Target.npID));
|
||||
|
||||
if (B == null)
|
||||
{
|
||||
|
@ -77,7 +77,7 @@
|
||||
</PropertyGroup>
|
||||
<PropertyGroup />
|
||||
<PropertyGroup>
|
||||
<RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
|
||||
<RunPostBuildEvent>OnOutputUpdated</RunPostBuildEvent>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<GenerateManifests>false</GenerateManifests>
|
||||
@ -300,14 +300,8 @@
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>cd "$(TargetDir)"
|
||||
del *.application
|
||||
del *.pdb
|
||||
del *.dll
|
||||
del app.config
|
||||
del *.manifest
|
||||
del *.log
|
||||
xcopy /Y /I /E "*" "$(SolutionDir)Release Build"</PostBuildEvent>
|
||||
<PostBuildEvent>
|
||||
</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
|
@ -15,7 +15,7 @@ namespace IW4MAdmin
|
||||
|
||||
static void Main(string[] args)
|
||||
{
|
||||
Version = 1.0;
|
||||
Version = 1.1;
|
||||
double latestVersion = 0;
|
||||
handler = new ConsoleEventDelegate(OnProcessExit);
|
||||
SetConsoleCtrlHandler(handler, true);
|
||||
|
@ -121,7 +121,7 @@ namespace IW4MAdmin
|
||||
else
|
||||
Message = "Player Kicked: Previous Ban";
|
||||
|
||||
NewPlayer.Kick(Message);
|
||||
NewPlayer.Kick(Message, NewPlayer);
|
||||
|
||||
if (players[NewPlayer.clientID] != null)
|
||||
{
|
||||
@ -144,9 +144,9 @@ namespace IW4MAdmin
|
||||
if (aP.Level == Player.Permission.Flagged)
|
||||
NewPlayer.setLevel(Player.Permission.Flagged);
|
||||
|
||||
Ban B = isBanned(aP);
|
||||
Penalty B = isBanned(aP);
|
||||
|
||||
if (B != null)
|
||||
if (B != null && B.BType == Penalty.Type.Ban)
|
||||
{
|
||||
Log.Write(String.Format("Banned client {0} is connecting with new alias {1}", aP.Name, NewPlayer.Name), Log.Level.Debug);
|
||||
NewPlayer.lastOffense = String.Format("Evading ( {0} )", aP.Name);
|
||||
@ -270,13 +270,13 @@ namespace IW4MAdmin
|
||||
}
|
||||
|
||||
//Check ban list for every banned player and return ban if match is found
|
||||
override public Ban isBanned(Player C)
|
||||
override public Penalty isBanned(Player C)
|
||||
{
|
||||
|
||||
if (C.Level == Player.Permission.Banned)
|
||||
return Bans.Find(p => p.npID.Equals(C.npID));
|
||||
|
||||
foreach (Ban B in Bans)
|
||||
foreach (Penalty B in Bans)
|
||||
{
|
||||
if (B.npID.Length < 5 || B.IP.Length < 5)
|
||||
continue;
|
||||
@ -838,6 +838,29 @@ namespace IW4MAdmin
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void Kick(string Reason, Player Target, Player Origin)
|
||||
{
|
||||
if (Target.clientID > -1)
|
||||
{
|
||||
Penalty newPenalty = new Penalty(Penalty.Type.Kick, SharedLibrary.Utilities.stripColors(Reason.Split(':')[1]), Target.npID, Origin.npID, DateTime.Now, Target.IP);
|
||||
clientDB.addBan(newPenalty);
|
||||
foreach (SharedLibrary.Server S in Program.getServers()) // make sure bans show up on the webfront
|
||||
S.Bans = S.clientDB.getBans();
|
||||
executeCommand("clientkick " + Target.clientID + " \"" + Reason + "^7\"");
|
||||
}
|
||||
}
|
||||
|
||||
public override void tempBan(string Reason, Player Target, Player Origin)
|
||||
{
|
||||
if (Target.clientID > -1)
|
||||
{
|
||||
executeCommand("tempbanclient " + Target.clientID + " \"" + Reason + "\"");
|
||||
Penalty newPenalty = new Penalty(Penalty.Type.TempBan, SharedLibrary.Utilities.stripColors(Reason.Split(':')[1]), Target.npID, Origin.npID, DateTime.Now, Target.IP);
|
||||
foreach (SharedLibrary.Server S in Program.getServers()) // make sure bans show up on the webfront
|
||||
S.Bans = S.clientDB.getBans();
|
||||
clientDB.addBan(newPenalty);
|
||||
}
|
||||
}
|
||||
override public void Ban(String Message, Player Target, Player Origin)
|
||||
{
|
||||
if (Target.clientID > -1)
|
||||
@ -846,7 +869,7 @@ namespace IW4MAdmin
|
||||
if (Origin != null)
|
||||
{
|
||||
Target.setLevel(Player.Permission.Banned);
|
||||
Ban newBan = new Ban(Target.lastOffense, Target.npID, Origin.npID, DateTime.Now, Target.IP);
|
||||
Penalty newBan = new Penalty(Penalty.Type.Ban, Target.lastOffense, Target.npID, Origin.npID, DateTime.Now, Target.IP);
|
||||
|
||||
clientDB.addBan(newBan);
|
||||
clientDB.updatePlayer(Target);
|
||||
@ -874,7 +897,7 @@ namespace IW4MAdmin
|
||||
|
||||
override public bool Unban(String GUID, Player Target)
|
||||
{
|
||||
foreach (Ban B in Bans)
|
||||
foreach (Penalty B in Bans)
|
||||
{
|
||||
if (B.npID == Target.npID)
|
||||
{
|
||||
|
@ -1,4 +1,12 @@
|
||||
VERSION 1.0
|
||||
VERSION 1.1
|
||||
CHANGELOG:
|
||||
-fixed ban sorting ( and an overlooked bug )
|
||||
-added kicks and temp-bans to penalty list
|
||||
-bans are now named penalties
|
||||
-readded pubbans page http://127.0.0.1:1624/pubbans
|
||||
-updated RepZ profile link
|
||||
|
||||
VERSION 1.0
|
||||
CHANGELOG:
|
||||
-first official stable release
|
||||
-fixed last known error (due to web front passing invalid sql syntax)
|
||||
@ -30,7 +38,7 @@ CHANGELOG:
|
||||
-webfront now displays player info and link to repz account
|
||||
-webfront shows ips for authed admin ( determined by ip )
|
||||
-webfront now show chat and allows authed players to send ingame messages
|
||||
-webfront now has public ban list http://127.0.0.1/?pubbans
|
||||
-webfront now has public ban list http://127.0.0.1:1624/pubbans
|
||||
-webfront now shows player history
|
||||
-fixed time span issue in webfront
|
||||
-fixed most recent ban always missing
|
||||
|
@ -1,5 +1,5 @@
|
||||
<div id="container">
|
||||
<div class="h0" style="margin-top: 0; line-height:normal;">BANS<br/><a style="padding: 0; margin: 0; font-size: 24px; float: right;" href="/">Back</a></div>
|
||||
<div class="h0" style="margin-top: 0; line-height:normal;">Penalties<br/><a style="padding: 0; margin: 0; font-size: 24px; float: right;" href="/">Back</a></div>
|
||||
<div id="logo_shit"></div>
|
||||
{{BANS}}
|
||||
</div>
|
@ -48,7 +48,7 @@
|
||||
width: 100px;
|
||||
height: 96px;
|
||||
float: right;
|
||||
background-image: url("http://23.251.150.125:8000/static/images/logo.png");
|
||||
background-image: url("");
|
||||
background-size: 100px 96px;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
@ -58,7 +58,7 @@
|
||||
width: 100px;
|
||||
height: 96px;
|
||||
float: left;
|
||||
background-image: url("http://23.251.150.125:8000/static/images/logo.png");
|
||||
background-image: url("");
|
||||
background-size: 100px 96px;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
Reference in New Issue
Block a user