diff --git a/Admin/Bans.cs b/Admin/Bans.cs deleted file mode 100644 index 266e83928..000000000 --- a/Admin/Bans.cs +++ /dev/null @@ -1,56 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace IW4MAdmin -{ - class Ban - { - public Ban(String Reas, String TargID, String From, DateTime time, String ip) - { - Reason = Reas; - npID = TargID; - bannedByID = From; - When = time; - IP = ip; - } - - public String getReason() - { - return Reason; - } - - public String getID() - { - return npID; - } - - public String getBanner() - { - return bannedByID; - } - - public String getIP() - { - return IP; - } - - public String getWhen() - { - return When.ToString("MM/dd/yy HH:mm:ss"); ; - } - - public DateTime getTime() - { - return When; - } - - private String Reason; - private String npID; - private String bannedByID; - private DateTime When; - private String IP; - - } - -} diff --git a/Admin/Command.cs b/Admin/Command.cs index 815d4e835..292f03bc0 100644 --- a/Admin/Command.cs +++ b/Admin/Command.cs @@ -33,7 +33,7 @@ namespace IW4MAdmin E.Origin.Tell("You cannot warn " + E.Target.Name); else { - E.Target.lastOffense = Utilities.removeWords(E.Data, 1); + E.Target.lastOffense = SharedLibrary.Utilities.removeWords(E.Data, 1); E.Target.Warnings++; 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); @@ -62,7 +62,7 @@ namespace IW4MAdmin public override void Execute(Event E) { - E.Target.lastOffense = Utilities.removeWords(E.Data, 1); + 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); @@ -87,7 +87,7 @@ namespace IW4MAdmin public override void Execute(Event E) { - E.Target.lastOffense = Utilities.removeWords(E.Data, 1); + 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); @@ -102,7 +102,7 @@ namespace IW4MAdmin public override void Execute(Event E) { - E.Target.lastOffense = Utilities.removeWords(E.Data, 1); + E.Target.lastOffense = SharedLibrary.Utilities.removeWords(E.Data, 1); E.Target.lastEvent = E; // needs to be fixed String Message; if (E.Owner.Website == null) @@ -138,7 +138,7 @@ namespace IW4MAdmin public override void Execute(Event E) { - String You = String.Format("{0} [^3#{1}^7] {2} [^3@{3}^7] [{4}^7] IP: {5}", E.Origin.Name, E.Origin.clientID, E.Origin.npID, E.Origin.databaseID, Utilities.levelToColor(E.Origin.Level), E.Origin.IP); + String You = String.Format("{0} [^3#{1}^7] {2} [^3@{3}^7] [{4}^7] IP: {5}", E.Origin.Name, E.Origin.clientID, E.Origin.npID, E.Origin.databaseID, SharedLibrary.Utilities.levelToColor(E.Origin.Level), E.Origin.IP); E.Origin.Tell(You); } } @@ -156,7 +156,7 @@ namespace IW4MAdmin if (P == null) continue; - E.Origin.Tell(String.Format("[^3{0}^7]{3}[^3{1}^7] {2}", Utilities.levelToColor(P.Level), P.clientID, P.Name, Utilities.getSpaces(Player.Permission.SeniorAdmin.ToString().Length - P.Level.ToString().Length))); + E.Origin.Tell(String.Format("[^3{0}^7]{3}[^3{1}^7] {2}", SharedLibrary.Utilities.levelToColor(P.Level), P.clientID, P.Name, SharedLibrary.Utilities.getSpaces(Player.Permission.SeniorAdmin.ToString().Length - P.Level.ToString().Length))); } } } @@ -245,7 +245,7 @@ namespace IW4MAdmin return; } - Player.Permission newPerm = Utilities.matchPermission(Utilities.removeWords(E.Data, 1)); + Player.Permission newPerm = SharedLibrary.Utilities.matchPermission(SharedLibrary.Utilities.removeWords(E.Data, 1)); if (newPerm > Player.Permission.Banned) { @@ -295,7 +295,7 @@ namespace IW4MAdmin { if (P != null && P.Level > Player.Permission.Flagged && !P.Masked) { - E.Origin.Tell(String.Format("[^3{0}^7] {1}", Utilities.levelToColor(P.Level), P.Name)); + E.Origin.Tell(String.Format("[^3{0}^7] {1}", SharedLibrary.Utilities.levelToColor(P.Level), P.Name)); } } } @@ -314,14 +314,14 @@ namespace IW4MAdmin if (m.Name.ToLower() == newMap || m.Alias.ToLower() == newMap) { E.Owner.Broadcast("Changing to map ^2" + m.Alias); - Utilities.Wait(3); + SharedLibrary.Utilities.Wait(3); E.Owner.Map(m.Name); return; } } E.Owner.Broadcast("Attempting to change to unknown map ^1" + newMap); - Utilities.Wait(3); + SharedLibrary.Utilities.Wait(3); E.Owner.Map(newMap); } } @@ -342,7 +342,7 @@ namespace IW4MAdmin foreach (Player P in db_players) { - String mesg = String.Format("[^3{0}^7] [^3@{1}^7] - [{2}^7] - {3} | last seen {4} ago", P.Name, P.databaseID, Utilities.levelToColor(P.Level), P.IP, P.getLastConnection()); + String mesg = String.Format("[^3{0}^7] [^3@{1}^7] - [{2}^7] - {3} | last seen {4} ago", P.Name, P.databaseID, SharedLibrary.Utilities.levelToColor(P.Level), P.IP, P.getLastConnection()); E.Origin.Tell(mesg); } } @@ -417,7 +417,7 @@ namespace IW4MAdmin public override void Execute(Event E) { - E.Data = Utilities.removeWords(E.Data, 1); + E.Data = SharedLibrary.Utilities.removeWords(E.Data, 1); E.Target.Alert(); E.Target.Tell("^1" + E.Origin.Name + " ^3[PM]^7 - " + E.Data); E.Origin.Tell(String.Format("To ^3{0} ^7-> {1}", E.Target.Name, E.Data)); @@ -562,7 +562,7 @@ namespace IW4MAdmin return; } - E.Data = Utilities.removeWords(E.Data, 1); + E.Data = SharedLibrary.Utilities.removeWords(E.Data, 1); E.Owner.Reports.Add(new Report(E.Target, E.Origin, E.Data)); E.Origin.Tell("Successfully reported " + E.Target.Name); @@ -599,7 +599,7 @@ namespace IW4MAdmin public override void Execute(Event E) { - E.Data = Utilities.removeWords(E.Data, 1); + E.Data = SharedLibrary.Utilities.removeWords(E.Data, 1); E.Origin.currentServer.executeCommand(String.Format("admin_lastevent tell;{0};{1};{2}", E.Origin.npID, E.Target.npID, E.Data)); } } diff --git a/Admin/IW4M ADMIN.csproj b/Admin/IW4M ADMIN.csproj index e08450549..d5c080270 100644 --- a/Admin/IW4M ADMIN.csproj +++ b/Admin/IW4M ADMIN.csproj @@ -59,6 +59,8 @@ true On false + false + false LocalIntranet @@ -71,12 +73,11 @@ IW4MAdmin.ico - - + IW4MAdmin.Program - OnOutputUpdated + OnBuildSuccess false @@ -91,11 +92,6 @@ ..\packages\Kayak.0.7.2\lib\Kayak.dll False - - False - bin\Debug\Moserware.Skills.dll - False - ..\SharedLibary\SharedLibary\bin\Debug\SharedLibary.dll False @@ -119,13 +115,13 @@ + True True Settings.settings - @@ -138,18 +134,15 @@ PreserveNewest - - PreserveNewest - - - PreserveNewest - Always PreserveNewest + + PreserveNewest + Always @@ -184,7 +177,9 @@ PreserveNewest - + + PreserveNewest + PreserveNewest @@ -303,13 +298,14 @@ cd "$(TargetDir)" -del *.config del *.application del *.pdb del *.dll +del app.config del *.manifest del *.rm -del *.log +del *.log +xcopy /E /Y "$(ProjectDir)bin\Release" "$(SolutionDir)Release Build"