Jump to content

Insane Limits Requests


ImportBot

Recommended Posts

Originally Posted by TMiland*:

 

Hi again, i am wondering if this code will work:

 

Code:

(
	!Regex.Match(kill.Category, @"(Handgun)").Success
	|| kill.Weapon == "U_M98B" || kill.Weapon == "U_M93R" || kill.Weapon == "U_GOL" || Regex.Match(kill.Weapon, @"(M93R|Glock18|SerbuShorty)", RegexOptions.IgnoreCase).Success
	) 
	&& !(kill.Category == "Suicide") || !(kill.Category == "Melee") || !(kill.Category == "Nonlethal")
To allow all pistols except, Glock18, 93R and shorty. And allow knifes, Medkit and the suicide category.

 

This is a mix of my original regex:

Code:

kill.Weapon == "U_M98B" || kill.Weapon == "U_M93R" || kill.Weapon == "U_GOL" || !Regex.Match(kill.Weapon, @"(U_Taurus44|U_HK45C|U_CZ75|U_FN57|U_M1911|U_M9|U_MP412Rex|U_MP443|U_P226|U_QSZ92|U_SW40|U_Flashbang|U_Defib|U_Medkit|Melee|Suicide|SoldierCollision|DamageArea|Death)", RegexOptions.IgnoreCase).Success
And the No Explosives code we discussed above. :smile:
* Restored post. It could be that the author is no longer active.
Link to comment
  • Replies 3.2k
  • Created
  • Last Reply

Originally Posted by PapaCharlie9*:

 

*edit:

I had trouble with this line:

Code:

Regex.Match(kill.Regex.Match(kill.Weapon,
Sorry, cut & paste error on my part. I've fixed my post, thanks.

This is my final code:

Code:

(
Regex.Match(server.MapFileName, @"(_:MP_Prison|XP0_Metro)", RegexOptions.IgnoreCase).Success 
&& (
		(
		Regex.Match(kill.Category, @"(Explosive|Impact)").Success
		|| Regex.Match(kill.Weapon, @"(ROADKILL|Death)", RegexOptions.IgnoreCase).Success
		)
		&& !(kill.Category == "Suicide")
	)
)
Seems to be doing the job okay now. :biggrin:
Looks good.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by PapaCharlie9*:

 

Hi again, i am wondering if this code will work:

 

Code:

(
	!Regex.Match(kill.Category, @"(Handgun)").Success
	|| kill.Weapon == "U_M98B" || kill.Weapon == "U_M93R" || kill.Weapon == "U_GOL" || Regex.Match(kill.Weapon, @"(M93R|Glock18|SerbuShorty)", RegexOptions.IgnoreCase).Success
	) 
	&& !(kill.Category == "Suicide") || !(kill.Category == "Melee") || !(kill.Category == "Nonlethal")
To allow all pistols except, Glock18, 93R and shorty. And allow knifes, Medkit and the suicide category.

 

This is a mix of my original regex:

Code:

kill.Weapon == "U_M98B" || kill.Weapon == "U_M93R" || kill.Weapon == "U_GOL" || !Regex.Match(kill.Weapon, @"(U_Taurus44|U_HK45C|U_CZ75|U_FN57|U_M1911|U_M9|U_MP412Rex|U_MP443|U_P226|U_QSZ92|U_SW40|U_Flashbang|U_Defib|U_Medkit|Melee|Suicide|SoldierCollision|DamageArea|Death)", RegexOptions.IgnoreCase).Success
And the No Explosives code we discussed above. :smile:
If I understand what you are trying to do correctly, I don't think that's quite right.

 

Since you want to allow pistols (rather than not allow explosives), the logic has to be inverted. You want the expression to be true for everything except the allowed weapons, rather than be true for only the disallowed weapons.

 

Code:

(
	(
		kill.Category != "Handgun"
		|| Regex.Match(kill.Weapon, @"(M93R|Glock18|SerbuShorty)", RegexOptions.IgnoreCase).Success
	)
	&& !(kill.Category == "Suicide" || kill.Category == "Melee" || kill.Category == "Nonlethal")
)
That says: If the killer used a weapon (whose category is not Handgun OR is one of the disallowed pistols) AND is NOT (Suicide OR Melee OR Nonlethal), do some kind of punishment.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by PapaCharlie9*:

 

Hi all,

 

I tried the whole day if it is possible to get running a script for autokill on explosive weapons if the server is running with preset infantry. But for now I have not found any script first checking the preset.

 

If this possible? An what will be the command for checking the preset first?

 

 

Thanks for your help...

Preset for infantry sets vars.vehicleSpawnAllowed to false. So you can test server.VehicleSpawnAllowed for false to indicate the preset is infantry only.

 

You can use the explosives limit here:

 

showthread....etro-Op-Locker*

 

And change first_check to this Expression:

 

Code:

(server.VehicleSpawnAllowed == false && Regex.Match(kill.Category, @"(Explosive|Impact)").Success)
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by PapaCharlie9*:

 

Hi all,

 

im german and new to this board. I know that theres an additional german section but i couldnt find an answer to my Request, neither here.

 

Im looking for a simple score (stats) announcer without the need to install an extra SQL-Database like this

 

If any Player stats > 10.000 yell "%p_n% reached 10.000 Points" in the actual round. a.s.o

 

Is there any possibility?

 

Sorry for my bad english

 

Thanks in advance

 

Frank

Your English is better than my Deutsch!

 

It depends on which stats you want to announce. And of course at the beginning of each round everything is reset to 0, so it will only apply for one round.

 

For example, if you want to announce any player that achieves 50 kills, you could use this:

 

Create a limit to evaluate OnKill, call it "Kill announcer".

 

Set first_check to this Expression:

 

Code:

(killer.KillsRound > 50)
Set Action to Yell.

 

Set yell_message to: %p_n% has 50 kills!

 

Set yell_audience to: All

 

Set yell_duration to: 10 (or whatever number of seconds you want)

 

Set yell_procon_chat: False

 

All of the stats you can use for a single round are listed in post #1 of the Insane Limits Plugin thread, in the Player, Killer, Victim Objects section. Only use stat names that end with Round, e.g., KillsRound, ScoreRound, etc. The other stats (Kills, Score, etc.) are from Battlelog.

 

showthread....0-12-MAR-2014)*

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by TMiland*:

 

If I understand what you are trying to do correctly, I don't think that's quite right.

 

Since you want to allow pistols (rather than not allow explosives), the logic has to be inverted. You want the expression to be true for everything except the allowed weapons, rather than be true for only the disallowed weapons.

 

Code:

(
	(
		kill.Category != "Handgun"
		|| Regex.Match(kill.Weapon, @"(M93R|Glock18|SerbuShorty)", RegexOptions.IgnoreCase).Success
	)
	&& !(kill.Category == "Suicide" || kill.Category == "Melee" || kill.Category == "Nonlethal")
)
That says: If the killer used a weapon (whose category is not Handgun OR is one of the disallowed pistols) AND is NOT (Suicide OR Melee OR Nonlethal), do some kind of punishment.
Okay lets see, what i want to achieve is to allow handguns & knifes, disallow M93R|Glock18|SerbuShorty, also allow Suicide, Melee and Nonlethal groups.

 

As for the No Explosives:

 

I want to disallow explosives, allow death and roadkill, also allow Suicide, Melee and Nonlethal groups.

 

Code:

(
Regex.Match(server.MapFileName, @"(_:MP_Prison|XP0_Metro)", RegexOptions.IgnoreCase).Success 
&& (
		(
		Regex.Match(kill.Category, @"(Explosive|Impact)").Success
		|| Regex.Match(kill.Weapon, @"(RoadKill|Death)", RegexOptions.IgnoreCase).Success
		)
		&& !(kill.Category == "Suicide" || kill.Category == "Melee" || kill.Category == "Nonlethal")
	)
)
Hoping this is the final post about this, as my head hurts by thinking about it lol! :smile:

 

*Edit:

What about the M98B, M93R and GOL in the handgun expression?

 

From the orig. code:

Code:

[b]kill.Weapon == "U_M98B" || kill.Weapon == "U_M93R" || kill.Weapon == "U_GOL" ||[/b] !Regex.Match(kill.Weapon, @"(U_Taurus44|U_HK45C|U_CZ75|U_FN57|U_M1911|U_M9|U_MP412Rex|U_MP443|U_P226|U_QSZ92|U_SW40|U_Flashbang|U_Defib|U_Medkit|Melee|Suicide|SoldierCollision|DamageArea|Death)", RegexOptions.IgnoreCase).Success
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by GerWonder*:

 

Preset for infantry sets vars.vehicleSpawnAllowed to false. So you can test server.VehicleSpawnAllowed for false to indicate the preset is infantry only.

 

You can use the explosives limit here:

 

showthread....etro-Op-Locker*

 

And change first_check to this Expression:

 

Code:

(server.VehicleSpawnAllowed == false && Regex.Match(kill.Category, @"(Explosive|Impact)").Success)
Big thanks PC9, this works like it should. Mercy
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by PapaCharlie9*:

 

*Edit:

What about the M98B, M93R and GOL in the handgun expression?

 

From the orig. code:

Code:

[b]kill.Weapon == "U_M98B" || kill.Weapon == "U_M93R" || kill.Weapon == "U_GOL" ||[/b] !Regex.Match(kill.Weapon, @"(U_Taurus44|U_HK45C|U_CZ75|U_FN57|U_M1911|U_M9|U_MP412Rex|U_MP443|U_P226|U_QSZ92|U_SW40|U_Flashbang|U_Defib|U_Medkit|Melee|Suicide|SoldierCollision|DamageArea|Death)", RegexOptions.IgnoreCase).Success
That's no longer needed. Those cases are already handled by kill.Category != "Handgun". None of those weapons are in the Handgun category.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by TMiland*:

 

That's no longer needed. Those cases are already handled by kill.Category != "Handgun". None of those weapons are in the Handgun category.

Okay, i see. What about the rest of the questions? I have to make sure it is 100% correct, so i don't kick everyone out again. :tongue:
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by Tomgun*:

 

!voterestart

 

is it possible to write a limit where it watches for people saying "lag" and over a certain amount if says in chat "If the server is lagging then type !voterestart to restart the round to help clear it"

 

Then do a say 15% vote !hellyes !hellno (keep it different from other vote systems) thingy to initiate a restart but use chat and yell to do a count down to the restart:

 

Yell on screen

 

Restarting round in.. (displays for 5 seconds

5 (1 second display)

4 (1 second display)

3 (1 second display)

2 (1 second display)

1 (1 second display)

restarting round to clear lag!! (displays for 5 seconds)

[then it restarts]

 

and chat box does the same.

 

Ive noticed when rubberbanding is happening a new round seems to clear it, if Im wrong then yeah ok limit abit pointless, I just think its a better alternative than rebooting the server. Obviously all the normal vote rules apply, 1 vote at a time etc etc.

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by PapaCharlie9*:

 

Okay, i see. What about the rest of the questions? I have to make sure it is 100% correct, so i don't kick everyone out again. :tongue:

Sorry, didn't realize you wanted the explosives code reviewed.

 

It can be simplified to this:

 

Code:

(
Regex.Match(server.MapFileName, @"(_:MP_Prison|XP0_Metro)", RegexOptions.IgnoreCase).Success 
&&  Regex.Match(kill.Category, @"(Explosive|Impact)").Success
)
Unlike the Handgun case, since you are matching a specific list of categories, any category that doesn't match, like Suicide, automatically is allowed, which is what you want.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by PapaCharlie9*:

 

I haven't noticed restarting a round helping lag in any way. I have noticed that skipping to the next map can help, for lag that is associated with a specific map of course.

 

Otherwise, everything you asked for can be done. Most of it is already done in the camping !votenext limit:

 

myrcon.net/.../insane-limits-v09r6-vote-to-nuke-campingbase-raping-team-or-surrender

 

You don't need !hellyes and !hellno, just use the number of !votenext commands typed in to count the vote.

 

The chat trigger for "lag" and such is easy:

 

Create a limit to evaluate OnAnyChat, call it "lag detector".

 

Set first_check to this Code:

 

Code:

if (!Regex.Match(player.LastChat, @"(^la+g+|\sla+g+|rubber)", RegexOptions.IgnoreCase).Success) return false;

plugin.SendPlayerMessage(player.Name, "Got lag_ Type !votenext to skip to the next map immediately");
plugin.SendGlobalYell("Got lag_ Type !votenext to skip to the next map immediately", 8);

return false;
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by TMiland*:

 

Sorry, didn't realize you wanted the explosives code reviewed.

 

It can be simplified to this:

 

Code:

(
Regex.Match(server.MapFileName, @"(_:MP_Prison|XP0_Metro)", RegexOptions.IgnoreCase).Success 
&&  Regex.Match(kill.Category, @"(Explosive|Impact)").Success
)
Unlike the Handgun case, since you are matching a specific list of categories, any category that doesn't match, like Suicide, automatically is allowed, which is what you want.
Thank you! I like simple! :biggrin:
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by p19blo*:

 

is there a shotgun only code about ? I cant find it and mine compiles an error.

 

Code:

if (!Regex.Match(kill.Weapon, @"(U_870|U_M26Mass_Frag|U_DBV12|U_HAWK|U_M1014|U_QBS09|U_SAIGA_20K|U_SPAS12|U_USAS-12|U_UTAS|U_SerbuShorty|U_Defib|Melee|Suicide|SoldierCollision|DamageArea)", RegexOptions.IgnoreCase).Success)
Fized it. I was missing more code when i copied.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by PapaCharlie9*:

 

is there a shotgun only code about ? I cant find it and mine compiles an error.

 

Code:

if (!Regex.Match(kill.Weapon, @"(U_870|U_M26Mass_Frag|U_DBV12|U_HAWK|U_M1014|U_QBS09|U_SAIGA_20K|U_SPAS12|U_USAS-12|U_UTAS|U_SerbuShorty|U_Defib|Melee|Suicide|SoldierCollision|DamageArea)", RegexOptions.IgnoreCase).Success)
Fized it. I was missing more code when i copied.
Shotgun-only is in a couple of posts in the "pistols" only thread:

 

myrcon.net/.../insane-limits-knife-and-pistols-only

 

Also, as discussed in the TMiland posts above, you can just use the kill.Category if you have Insane Limits 0.9.16.0 or later. Just replace "Handgun" with "Shotgun".

 

OnKill first_check Expression:

 

Code:

(
	kill.Category != "Shotgun"
	&& !(kill.Category == "Suicide" || kill.Category == "Melee" || kill.Category == "Nonlethal")
)
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by TMiland*:

 

Is this possible:

 

A limit to warn/kick players with a specific tag if they joined a already full server in a list of servers if others are empty?

 

I hate how our members are reaping the benefits of joining servers that is already filled up, and would like a way to make them HAVE to contribute to be able to play on a server of choice.

 

This may sound silly, but i am getting tired of spending all day filling the servers up all alone, i would like to have a life too. :tongue:

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by PapaCharlie9*:

 

Is this possible:

 

A limit to warn/kick players with a specific tag if they joined a already full server in a list of servers if others are empty?

 

I hate how our members are reaping the benefits of joining servers that is already filled up, and would like a way to make them HAVE to contribute to be able to play on a server of choice.

 

This may sound silly, but i am getting tired of spending all day filling the servers up all alone, i would like to have a life too. :tongue:

Sure. I suggest doing it on every spawn, so they get nagged to death.

 

Create a new limit to evaluate OnSpawn, call it "Nag to join empty server".

 

Set first_check to this Expression:

 

Code:

(player.Tag == "XXX")
Change XXX to whatever tag you want to use. If it is more than one tag, do it like this:

 

Code:

(player.Tag == "XXX" || player.Tag == "YYY")
If the tag is embedded in the player name and not entered in Battlelog, use this (change first_check to Code):

 

Code:

// Extract tag from name
    String ptag = player.Tag;
    if (String.IsNullOrEmpty(ptag)) {
        // Maybe they are using [_-=]XXX[=-_]PlayerName[_-=]XXX[=-_] format
        Match tm = Regex.Match(player.Name, @"^[=_\-]*([^=_\-]{2,4})[=_\-]");
        if (tm.Success) {
            ptag = tm.Groups[1].Value;
        } else {
            tm = Regex.Match(player.Name, @"[^=_\-][=_\-]([^=_\-]{2,4})[=_\-]*$");
            if (tm.Success) { 
                ptag = tm.Groups[1].Value;
            } else {
                ptag = String.Empty;
            }
        }
    }
    return (ptag == "XXX");
Set second_check to this Expression:

 

Code:

(server.PlayerCount > N)
Change N to the number of players you consider full for your server.

 

Set Action to whatever you want, for example

 

Say | Yell

 

Then fill in the _say and _yell form items as you like. For example:

 

_yell_message: Hey %p_n%! Join one of our empty servers instead of this one!

 

_yell_audience: Player

 

_yell_duration: 10

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by TMiland*:

 

Sure. I suggest doing it on every spawn, so they get nagged to death.

 

Create a new limit to evaluate OnSpawn, call it "Nag to join empty server".

 

Set first_check to this Expression:

 

Code:

(player.Tag == "XXX")
Change XXX to whatever tag you want to use. If it is more than one tag, do it like this:

 

Code:

(player.Tag == "XXX" || player.Tag == "YYY")
If the tag is embedded in the player name and not entered in Battlelog, use this (change first_check to Code):

 

Code:

// Extract tag from name
    String ptag = player.Tag;
    if (String.IsNullOrEmpty(ptag)) {
        // Maybe they are using [_-=]XXX[=-_]PlayerName[_-=]XXX[=-_] format
        Match tm = Regex.Match(player.Name, @"^[=_\-]*([^=_\-]{2,4})[=_\-]");
        if (tm.Success) {
            ptag = tm.Groups[1].Value;
        } else {
            tm = Regex.Match(player.Name, @"[^=_\-][=_\-]([^=_\-]{2,4})[=_\-]*$");
            if (tm.Success) { 
                ptag = tm.Groups[1].Value;
            } else {
                ptag = String.Empty;
            }
        }
    }
    return (ptag == "XXX");
Set second_check to this Expression:

 

Code:

(server.PlayerCount > N)
Change N to the number of players you consider full for your server.

 

Set Action to whatever you want, for example

 

Say | Yell

 

Then fill in the _say and _yell form items as you like. For example:

 

_yell_message: Hey %p_n%! Join one of our empty servers instead of this one!

 

_yell_audience: Player

 

_yell_duration: 10

Ahh! Nice, you are awesome! :biggrin: Thank you!
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by TMiland*:

 

Okay, i have been searching for hours now, and i need help on this.

 

From this limit: showthread....e-on-Profanity*

 

How can i use a list of words from a list called f.eks "bad_words" and "bad_words_regex"?

 

The list will be like this:

 

word1

word2

word2

 

And same goes for the regex list. :smile:

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by PapaCharlie9*:

 

Okay, i have been searching for hours now, and i need help on this.

 

From this limit: showthread....e-on-Profanity*

 

How can i use a list of words from a list called f.eks "bad_words" and "bad_words_regex"?

 

The list will be like this:

 

word1

word2

word2

 

And same goes for the regex list. :smile:

Are you talking about Insane Limits or a plugin? For Insane Limits, you can't make a list like:

 

word1

word2

word3

 

You can make a list like:

 

word1, word2, word3

 

Set use_custom_lists to True. That reveals the Lists Manager section.

 

Use new_list to create a new list section.

 

Set the _state to Enabled and change the _name to what you want the list to be. For this example, I'll use bad_words. Set _comparison and _data to whatever you want.

 

In the limit code, you check for a match in the list as follows:

 

Code:

String word = ... // some word you extracted from chat using your code

if (plugin.isInList(word, "bad_words")) {
    // ... match was found!
}
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by TMiland*:

 

Are you talking about Insane Limits or a plugin? For Insane Limits, you can't make a list like:

 

word1

word2

word3

 

You can make a list like:

 

word1, word2, word3

 

Set use_custom_lists to True. That reveals the Lists Manager section.

 

Use new_list to create a new list section.

 

Set the _state to Enabled and change the _name to what you want the list to be. For this example, I'll use bad_words. Set _comparison and _data to whatever you want.

 

In the limit code, you check for a match in the list as follows:

 

Code:

String word = ... // some word you extracted from chat using your code

if (plugin.isInList(word, "bad_words")) {
    // ... match was found!
}
This is the code i need to work with lists:

Code:

List<String> bad_words = new List<String>();
	bad_words.Add("BadWord"); // Change This
	// this matches nigger, n1g3r, nig3, etc 
	bad_words.Add(@"n+[1i]+g+[3ea]+r*"); // Change This
	// this matches faggot, f4g0t, fagat, etc
	bad_words.Add(@"f+[a4]+g+[ao0]+t*"); // Change This
	// this matches fag, f4g, fagggg, fa4g, etc.
	bad_words.Add(@"f+[a4]+g+"); // Change This

	String[] chat_words = Regex.Split(player.LastChat, @"\s+");

	foreach(String chat_word in chat_words)
		foreach(String bad_word in bad_words)
			if (Regex.Match(chat_word, "^"+bad_word+"$", RegexOptions.IgnoreCase).Success)
				return true;

	return false;
I have been trying for 12 hours today to make this work, and i have to give up now.. :sad:
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by Tomgun*:

 

I haven't noticed restarting a round helping lag in any way. I have noticed that skipping to the next map can help, for lag that is associated with a specific map of course.

 

Otherwise, everything you asked for can be done. Most of it is already done in the camping !votenext limit:

 

myrcon.net/.../insane-limits-v09r6-vote-to-nuke-campingbase-raping-team-or-surrender

 

You don't need !hellyes and !hellno, just use the number of !votenext commands typed in to count the vote.

 

The chat trigger for "lag" and such is easy:

 

Create a limit to evaluate OnAnyChat, call it "lag detector".

 

Set first_check to this Code:

 

Code:

if (!Regex.Match(player.LastChat, @"(^la+g+|\sla+g+|rubber)", RegexOptions.IgnoreCase).Success) return false;

plugin.SendPlayerMessage(player.Name, "Got lag_ Type !votenext to skip to the next map immediately");
plugin.SendGlobalYell("Got lag_ Type !votenext to skip to the next map immediately", 8);

return false;
ok so the final code for this to work is?

 

Lag is a big issue for the NS maps so if a final can be done to get this to work I would appreciate it

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by TMiland*:

 

Todays try, i have come this far now:

 

Code:

string bad_words = "bad_words_list";
	string[] chat_words = Regex.Split(player.LastChat, @"\s+");
	
	foreach(string chat_word in chat_words)
	{
		foreach(string bad_word in bad_words.Split(','))
		{
			if (plugin.isInList(chat_word, "^"+bad_word+"$"))
			{
				return true;
			}
		}
	}
	return false;
But it's still not picking up the bad words from the list. :tongue:
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by Tomgun*:

 

I haven't noticed restarting a round helping lag in any way. I have noticed that skipping to the next map can help, for lag that is associated with a specific map of course.

 

Otherwise, everything you asked for can be done. Most of it is already done in the camping !votenext limit:

 

myrcon.net/.../insane-limits-v09r6-vote-to-nuke-campingbase-raping-team-or-surrender

 

You don't need !hellyes and !hellno, just use the number of !votenext commands typed in to count the vote.

 

The chat trigger for "lag" and such is easy:

 

Create a limit to evaluate OnAnyChat, call it "lag detector".

 

Set first_check to this Code:

 

Code:

if (!Regex.Match(player.LastChat, @"(^la+g+|\sla+g+|rubber)", RegexOptions.IgnoreCase).Success) return false;

plugin.SendPlayerMessage(player.Name, "Got lag_ Type !votenext to skip to the next map immediately");
plugin.SendGlobalYell("Got lag_ Type !votenext to skip to the next map immediately", 8);

return false;
still trying to get this to work but im struggling, if it can be editied to do an otion for either !votenext and !voterestart to either go next round or restart the one its on it would help
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by PapaCharlie9*:

 

Todays try, i have come this far now:

 

Code:

string bad_words = "bad_words_list";
	string[] chat_words = Regex.Split(player.LastChat, @"\s+");
	
	foreach(string chat_word in chat_words)
	{
		foreach(string bad_word in bad_words.Split(','))
		{
			if (plugin.isInList(chat_word, "^"+bad_word+"$"))
			{
				return true;
			}
		}
	}
	return false;
But it's still not picking up the bad words from the list. :tongue:
I didn't understand what you wanted. You can't get the contents of a custom list, that's not supported. No wonder you were struggling!

 

The only thing you can do is the sample code I gave you. You can do a plugin.isInList test, that's it. So that means no Regex. You have to put each fully spelled-out phrase that you want checked. And forget the foreach of bad_words, you don't need those anymore. As long as the list is populated with all possible combinations:

 

noob, nooob, noooob, n00b, no0b, n oob, no ob, noo b, newb

 

All you need is:

 

Code:

string[] chat_words = Regex.Split(player.LastChat, @"\s+");

	foreach(string chat_word in chat_words)
	{
		if (plugin.isInList(chat_word, "bad_words_list")) {
			return true;
		}
	}
If you set up the list for CaseInsenstive comparison, you don't have to worry about NOOB vs noob. Just do everything in lower case in the list.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by TMiland*:

 

I didn't understand what you wanted. You can't get the contents of a custom list, that's not supported. No wonder you were struggling!

 

The only thing you can do is the sample code I gave you. You can do a plugin.isInList test, that's it. So that means no Regex. You have to put each fully spelled-out phrase that you want checked. And forget the foreach of bad_words, you don't need those anymore. As long as the list is populated with all possible combinations:

 

noob, nooob, noooob, n00b, no0b, n oob, no ob, noo b, newb

 

All you need is:

 

Code:

string[] chat_words = Regex.Split(player.LastChat, @"\s+");

	foreach(string chat_word in chat_words)
	{
		if (plugin.isInList(chat_word, "bad_words_list")) {
			return true;
		}
	}
If you set up the list for CaseInsenstive comparison, you don't have to worry about NOOB vs noob. Just do everything in lower case in the list.
I was trying to get the contents of the list "bad_words_list", but i see now that i over complicated the code! :biggrin:

 

Well, THANKS for helping me! I am almost embarrassed. :mad:

 

And this is working wery well, someone tripped the trap once i got the right code! :biggrin:

 

[20:03:24] PlayerName > sure

[20:03:26] PlayerName > fucking fagit

[20:02:05] ADMIN MUTE > ATTENTION PlayerName! Please avoid using profanity, you will be muted for the rest of the round!

[20:06:06] PlayerName - Russian Army > TEAM CAN U WAKE THE FUCK UP AND DO SOMETHING

[20:04:44] ADMIN MUTE > /@mute PlayerName You have been muted for using profanity in chat!

[20:04:45] AdKats > Say > PlayerName > You have been muted by an admin, talking will cause punishment. You can speak again next round.

[20:04:45] AdKats > PlayerName has been muted for this round.

[20:06:44] PlayerName > fucking camping noobteam

[20:05:29] AdKats > Say > PlayerName > Killed by admin for Do not talk while muted. You can speak again next round.

[20:05:29] AdKats > Yell[5] > PlayerName > Killed by admin for Do not talk while muted. You can speak again next round.

[20:07:11] PlayerName > this team

[20:07:13] PlayerName > so bad

[20:07:19] PlayerName > its sick how bad they are

[20:07:26] PlayerName > its kinda hard 1 vs 31 :smile:

[20:06:58] AdKats > Say > PlayerName > Killed by admin for Do not talk while muted. You can speak again next round.

[20:06:58] AdKats > Yell[5] > PlayerName > Killed by admin for Do not talk while muted. You can speak again next round.

[20:11:42] PlayerName > fucking fagteam

[20:10:20] ADMIN MUTE > ATTENTION PlayerName! Please avoid using profanity, you will be muted for the rest of the round!

[20:10:20] AdKats > Say > All > Player PlayerName was KICKED by admin for Talking excessively while muted.

[20:11:43] PlayerName has left the server..

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by PapaCharlie9*:

 

Is it possible to pick up the Commo Rose chat somehow?

 

I have tried with player.LastChat but that's not working. :smile:

I don't actually know. You might have to ask the Procon devs that.

 

Insane Limits does ignore chat if it can't figure out which player sent it. So any chat sent by "Admin" or "Console" or "System" or whatever is ignored.

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by ColColonCleaner*:

 

I don't actually know. You might have to ask the Procon devs that.

 

Insane Limits does ignore chat if it can't figure out which player sent it. So any chat sent by "Admin" or "Console" or "System" or whatever is ignored.

Rose messages are sent, and they are from the player. They each have a specific code as the text.
* Restored post. It could be that the author is no longer active.
Link to comment

Archived

This topic is now archived and is closed to further replies.




  • Our picks

    • Game Server Hosting:

      We're happy to announce that EZRCON will branch out into the game server provider scene. This is a big step for us so please having patience if something doesn't go right in this area. Now, what makes us different compared to other providers? Well, we're going with the idea of having a scaleable server hosting and providing more control in how you set up your server. For example, in Minecraft, you have the ability to control how many CPU cores you wish your server to have access to, how much RAM you want to use, how much disk space you want to use. This type of control can't be offered in a single service package so you're able to configure a custom package the way you want it.

      You can see all the available games here. Currently, we have the following games available.

      Valheim (From $1.50 USD)


      Rust (From $3.20 USD)


      Minecraft (Basic) (From $4.00 USD)


      Call of Duty 4X (From $7.00 USD)


      OpenTTD (From $4.00 USD)


      Squad (From $9.00 USD)


      Insurgency: Sandstorm (From $6.40 USD)


      Changes to US-East:

      Starting in January 2022, we will be moving to a different provider that has better support, better infrastructure, and better connectivity. We've noticed that the connection/routes to this location are not ideal and it's been hard getting support to correct this. Our contract for our two servers ends in March/April respectively. If you currently have servers in this location you will be migrated over to the new provider. We'll have more details when the time comes closer to January. The new location for this change will be based out of Atlanta, GA. If you have any questions/concerns please open a ticket and we'll do our best to answer them.
      • 5 replies
    • Hello All,

      I wanted to give an update to how EZRCON is doing. As of today we have 56 active customers using the services offered. I'm glad its doing so well and it hasn't been 1 year yet. To those that have services with EZRCON, I hope the service is doing well and if not please let us know so that we can improve it where possible. We've done quite a few changes behind the scenes to improve the performance hopefully. 

      We'll be launching a new location for hosting procon layers in either Los Angeles, USA or Chicago, IL. Still being decided on where the placement should be but these two locations are not set in stone yet. We would like to get feedback on where we should have a new location for hosting the Procon Layers, which you can do by replying to this topic. A poll will be created where people can vote on which location they would like to see.

      We're also looking for some suggestions on what else you would like to see for hosting provider options. So please let us know your thoughts on this matter.
      • 4 replies
    • Added ability to disable the new API check for player country info


      Updated GeoIP database file


      Removed usage sending stats


      Added EZRCON ad banner



      If you are upgrading then you may need to add these two lines to your existing installation in the file procon.cfg. To enable these options just change False to True.

      procon.private.options.UseGeoIpFileOnly False
      procon.private.options.BlockRssFeedNews False



       
      • 2 replies
    • I wanted I let you know that I am starting to build out the foundation for the hosting services that I talked about here. The pricing model I was originally going for wasn't going to be suitable for how I want to build it. So instead I decided to offer each service as it's own product instead of a package deal. In the future, hopefully, I will be able to do this and offer discounts to those that choose it.

      Here is how the pricing is laid out for each service as well as information about each. This is as of 7/12/2020.

      Single MySQL database (up to 30 GB) is $10 USD per month.



      If you go over the 30 GB usage for the database then each additional gigabyte is charged at $0.10 USD each billing cycle. If you're under 30GB you don't need to worry about this.


      Databases are replicated across 3 zones (regions) for redundancy. One (1) on the east coast of the USA, One (1) in Frankfurt, and One (1) in Singapore. Depending on the demand, this would grow to more regions.


      Databases will also be backed up daily and retained for 7 days.




      Procon Layer will be $2 USD per month.


      Each layer will only allow one (1) game server connection. The reason behind this is for performance.


      Each layer will also come with all available plugins installed by default. This is to help facilitate faster deployments and get you up and running quickly.


      Each layer will automatically restart if Procon crashes. 


      Each layer will also automatically restart daily at midnight to make sure it stays in tip-top shape.


      Custom plugins can be installed by submitting a support ticket.




      Battlefield Admin Control Panel (BFACP) will be $5 USD per month


      As I am still working on building version 3 of the software, I will be installing the last version I did. Once I complete version 3 it will automatically be upgraded for you.





      All these services will be managed by me so you don't have to worry about the technical side of things to get up and going.

      If you would like to see how much it would cost for the services, I made a calculator that you can use. It can be found here https://ezrcon.com/calculator.html

       
      • 11 replies
    • I have pushed out a new minor release which updates the geodata pull (flags in the playerlisting). This should be way more accurate now. As always, please let me know if any problems show up.

       
      • 9 replies
×
×
  • Create New...

Important Information

Please review our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.