Skip to content

Commit e93c1fe

Browse files
author
FredericaBernkastel
committed
v3.3.13:
* FIXED: Player connect message with additional info. * GROUPS:: NEW FEATURE: -*unsafe* and -*abusive* group rules. Let you easily disable all abusive and unsafe commands. Check docs for more info. * GROUPS:: New group "banned". Each command are blocked, even if command allowed for default group, except "!suicide". * CHANGED: !fly : If command executed by spectator, he will be spawned. He can't kill, and can't be killed. * CHANGED: !teleport <player2> <player1> -> !teleport <player1> <player2>
1 parent b9501e5 commit e93c1fe

12 files changed

+44
-13
lines changed

DGAdmin guide.pdf

29.7 KB
Binary file not shown.

LambAdmin/Commands.cs

+5-5
Original file line numberDiff line numberDiff line change
@@ -2300,7 +2300,7 @@ select Command.GetString("dbsearch", "message_found").Format(new Dictionary<stri
23002300
Entity player2 = FindSinglePlayer(arguments[1]);
23012301
if ((player1 != null) && (player2 != null))
23022302
{
2303-
player2.Call("setOrigin", player1.Origin);
2303+
player1.Call("setOrigin", player2.Origin);
23042304
WriteChatToPlayer(sender, Command.GetString("teleport", "message").Format(new Dictionary<string, string>()
23052305
{
23062306
{"<player1>", player1.Name },
@@ -2337,8 +2337,8 @@ select Command.GetString("dbsearch", "message_found").Format(new Dictionary<stri
23372337
{
23382338
sender.OnNotify("fly_on", new Action<Entity>((_player) =>
23392339
{
2340-
if (UTILS_GetFieldSafe<int>(_player, "CMD_FLY") == EVENTHANDLERS_ACTIVE &&
2341-
_player.GetField<string>("sessionstate") == "playing")
2340+
if (UTILS_GetFieldSafe<int>(_player, "CMD_FLY") == EVENTHANDLERS_ACTIVE/* &&
2341+
_player.GetField<string>("sessionstate") == "playing"*/)
23422342
{
23432343
sender.SetField("CMD_FLY", EFFECTS_ACTIVE);
23442344
_player.Call("allowspectateteam", "freelook", true);
@@ -2359,8 +2359,8 @@ select Command.GetString("dbsearch", "message_found").Format(new Dictionary<stri
23592359
}));
23602360
sender.OnNotify("fly_off", new Action<Entity>((_player) =>
23612361
{
2362-
if (UTILS_GetFieldSafe<int>(_player, "CMD_FLY") == EFFECTS_ACTIVE &&
2363-
_player.GetField<string>("sessionstate") == "spectator")
2362+
if (UTILS_GetFieldSafe<int>(_player, "CMD_FLY") == EFFECTS_ACTIVE/* &&
2363+
_player.GetField<string>("sessionstate") == "spectator"*/)
23642364
{
23652365
_player.SetField("CMD_FLY", EVENTHANDLERS_ACTIVE);
23662366
_player.Call("allowspectateteam", "freelook", false);

LambAdmin/Config.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public partial class DGAdmin
5656
{ "settings_teamicons_allies", "cardicon_weed" },
5757
{ "settings_teamicons_axis", "cardicon_thebomb" },
5858
{ "settings_enable_connectmessage", "false" },
59-
{ "format_connectmessage", "^3<player> ^7connected." },
59+
{ "format_connectmessage", "^3#^1<hour>:<min> ^3#^1<clientnumber> ^3#^1<rank> ^3#^1<player> ^7Connected." },
6060
{ "settings_enable_misccommands", "false" },
6161
{ "settings_maxwarns", "3" },
6262
{ "settings_groups_autosave", "true" },

LambAdmin/Groups.cs

+20-3
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,25 @@ public Group(string name, string password, List<string> perms, string sh_name =
4646

4747
public bool CanDo(string permission)
4848
{
49+
List<string> abusive = new List<string>() {
50+
"freeze", "unfreeze", "mute", "unmute",
51+
"kill", "sunlight", "rotatescreen", "fakesay",
52+
"rek", "rektroll", "nootnoot", "daytime",
53+
"kd", "setfx", "hell", "fire",
54+
"3rdperson", "teleport", "fly", "jump",
55+
"speed", "gravity", "ac130", "setclantag",
56+
"letmehardscope"
57+
};
58+
List<string> _unsafe = new List<string>() {
59+
"sdvar", "server", "setclantag", "fc",
60+
"foreach", "svpassword"
61+
};
4962
if (permissions.Contains("-" + permission))
5063
return false;
64+
if (permissions.Contains("-*abusive*") && abusive.Contains(permission))
65+
return false;
66+
if (permissions.Contains("-*unsafe*") && _unsafe.Contains(permission))
67+
return false;
5168
if (permissions.Contains(permission) || permissions.Contains("*all*"))
5269
return true;
5370
return false;
@@ -68,7 +85,7 @@ public GroupsDatabase()
6885
"default::pm,admins,guid,version,rules,afk,credits,hidebombicon,help,rage,maps,time,amsg,ft,hwid,apply,night,fillammo,report,suicide,yes,no,register,xlrstats,xlrtop",
6986
"moderator:password:login,warn,unwarn,kick,mode,map,setafk,kick,tmpban,changeteam,lastreports:^0[^5Moderator^0]^7",
7087
"family:password:kickhacker,kill,mute,unmute,end,tmpbantime,cdvar,getplayerinfo,say,sayto,resetwarns,setgroup,scream,whois,changeteam,yell,gametype,mode,login,map,status,kick,tmpban,ban,warn,unwarn,getwarns,res,setafk,setteam,balance,clanvsall,clanvsallspectate,sunlight,alias,lastreports,fire:^0[^3F^0]^7",
71-
"elder:password:*all*:^0[^4Elder^0]^7",
88+
"elder:password:-*unsafe*,*all*:^0[^4Elder^0]^7",
7289
"developer:password:*all*:^0[^;D^0]^",
7390
"owner:password:*all*:^0[^1O^2w^3n^4e^5r^0]^3",
7491
"admin:password:scream,whois,changeteam,yell,gametype,mode,login,map,status,unban,unban-id,kick,tmpban,ban,warn,unwarn,getwarns,res,setafk,setteam,balance,clanvsall,clanvsallspectate,login,lastreports:^0[^1Admin^0]^7",
@@ -79,8 +96,8 @@ public GroupsDatabase()
7996
"vip:password:ban,kick,tmpban,warn,unwarn,map,balance,mode,whois,status,login,setafk,changeteam,scream,fakesay,myalias,fire:^0[^3V.I.P.^0]^7",
8097
"founder:password:*all*:^0[^1F^2o^3u^4n^5d^6e^8r^0]^6",
8198
"donator:password:kick,warn,tmpban,unwarn,mute,unmute,login,balance,setafk,changeteam,myalias,lastreports,fire:^0[^2Donator^0]^7",
82-
"nab:password:kick,warn,unwarn,tmpbantime,tmpban,mute,unmute,balance,setafk,changeteam,login,lastreports:^0[^1N^2A^3B^0]^7",
83-
"coleader:password:*all*:^0[^3CoLeader^0]^7"
99+
"banned::-pm,-admins,-guid,-version,-rules,-afk,-credits,-hidebombicon,-help,-rage,-maps,-time,-amsg,-ft,-hwid,-apply,-night,-fillammo,-report,-yes,-no,-register,-xlrstats,-xlrtop:^0[^1BANNED]^7",
100+
"coleader:password:-*abusive*,-*unsafe*,*all*:^0[^3CoLeader^0]^7"
84101
});
85102
}
86103

LambAdmin/ISnipe.cs

+5-1
Original file line numberDiff line numberDiff line change
@@ -185,10 +185,14 @@ public void SNIPE_PeriodicChecks(Entity player, Entity inflictor, Entity attacke
185185
}
186186
if (!attacker.IsPlayer)
187187
return;
188+
189+
if (attacker.IsSpectating())
190+
player.Health += damage;
191+
188192
if (weapon == "iw5_usp45_mp_tactical" && Call<string>("getdvar", "g_gametype") == "infect" && attacker.GetTeam() != "allies")
189193
return;
190194
if (ConfigValues.ISNIPE_SETTINGS.ANTINOSCOPE && (UTILS_GetFieldSafe<int>(attacker, "weapon_fired_noscope") == 1))
191-
player.Health += damage * 2;
195+
player.Health += damage;
192196
if (ConfigValues.ISNIPE_SETTINGS.ANTICRTK && (weapon == "throwingknife_mp") && (attacker.Origin.DistanceTo2D(player.Origin) < 200f))
193197
{
194198
player.Health += damage;

LambAdmin/Main.cs

+4
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,10 @@ public void MAIN_OnPlayerConnect(Entity player)
211211
{
212212
{ "<player>", player.Name },
213213
{ "<playerf>", player.GetFormattedName(database) },
214+
{ "<clientnumber>", player.GetEntityNumber().ToString() },
215+
{ "<hour>", DateTime.Now.Hour.ToString() },
216+
{ "<min>", DateTime.Now.Minute.ToString() },
217+
{ "<rank>", player.GetGroup(database).group_name.ToString() }
214218
}));
215219
}
216220

LambAdmin/Properties/AssemblyInfo.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,5 @@
3232
// You can specify all the values or you can default the Build and Revision Numbers
3333
// by using the '*' as shown below:
3434
// [assembly: AssemblyVersion("1.0.*")]
35-
[assembly: AssemblyVersion("3.3.12.0")]
36-
[assembly: AssemblyFileVersion("3.3.12.0")]
35+
[assembly: AssemblyVersion("3.3.13.0")]
36+
[assembly: AssemblyFileVersion("3.3.13.0")]

LambAdmin/Utilities.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public class Dvars : List<Dvar>{};
3535
//-------
3636
public static partial class ConfigValues
3737
{
38-
public static string Version = "v3.3n12";
38+
public static string Version = "v3.3n13";
3939
public static string ConfigPath = @"scripts\DGAdmin\";
4040
public static string ChatPrefix
4141
{

LambAdmin/bin/Debug/DGAdmin.dll

1 KB
Binary file not shown.

LambAdmin/bin/Release/DGAdmin.dll

1 KB
Binary file not shown.
202 KB
Binary file not shown.

version log.txt

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
v3.3.13:
2+
* FIXED: Player connect message with additional info.
3+
* GROUPS:: NEW FEATURE: -*unsafe* and -*abusive* group rules. Let you easily disable all abusive and unsafe commands. Check docs for more info.
4+
* GROUPS:: New group "banned". Each command are blocked, even if command allowed for default group, except "!suicide".
5+
* CHANGED: !fly : If command executed by spectator, he will be spawned. He can't kill, and can't be killed.
6+
* CHANGED: !teleport <player2> <player1> -> !teleport <player1> <player2>
17
v3.3.12:
28
* COMMAND: !playfxontag <fx> [tag = j_head]
39
* COMMAND: !setclantag <player> [tag]

0 commit comments

Comments
 (0)