Jump to content

Insane Limits Requests


ImportBot

Recommended Posts

Originally Posted by PapaCharlie9*:

 

The issue is that sometimes the yell is sent at the end of a round, instead of at the beginning.

 

My theory is that warm-ups confuse Insane Limits. The warm-up time didn't exist when Insane Limits was designed and implemented, so it doesn't really know what to do with it. It probably looks like a really short round starts and ends. When a real round ends, 3 events are sent, so Insane Limits wants to see all 3 to know the round is over. At the end of a warmup, I'm guessing only one or maybe none are sent. Two round starts in a row would definitely confuse Insane Limits.

 

I'll have to do some experiments on a scrim server to see if I'm right.

 

BTW, this bug is probably impacting limit.Activations or any round-based feature of Insane Limits. I've noticed some of my limit.Activations based limits have been behaving strangely ever since R-26 was released.

* Restored post. It could be that the author is no longer active.
Link to comment
  • Replies 3.2k
  • Created
  • Last Reply

Originally Posted by HexaCanon*:

 

The issue is that sometimes the yell is sent at the end of a round, instead of at the beginning.

 

My theory is that warm-ups confuse Insane Limits. The warm-up time didn't exist when Insane Limits was designed and implemented, so it doesn't really know what to do with it. It probably looks like a really short round starts and ends. When a real round ends, 3 events are sent, so Insane Limits wants to see all 3 to know the round is over. At the end of a warmup, I'm guessing only one or maybe none are sent. Two round starts in a row would definitely confuse Insane Limits.

 

I'll have to do some experiments on a scrim server to see if I'm right.

 

BTW, this bug is probably impacting limit.Activations or any round-based feature of Insane Limits. I've noticed some of my limit.Activations based limits have been behaving strangely ever since R-26 was released.

can you also test with adding some limit checks such as

 

server.TimeRound

 

or

 

teamX.RemainTicketsPercent

 

 

see if they prevent this kind of incident.

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

Originally Posted by Singh400*:

 

BTW, this bug is probably impacting limit.Activations or any round-based feature of Insane Limits. I've noticed some of my limit.Activations based limits have been behaving strangely ever since R-26 was released.

Yep, I've seen this too.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by rlcale*:

 

Can anyone help me setup a limit to kill on the 1st use and no warnings for the following weapons (RPG - M320 - SMAW - M15 At MINE) in all maps. My programming is very limited and I could not figure out how to do this. I thank you in advance for your help.

Roger

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

Originally Posted by HexaCanon*:

 

Can anyone help me setup a limit to kill on the 1st use and no warnings for the following weapons (RPG - M320 - SMAW - M15 At MINE) in all maps. My programming is very limited and I could not figure out how to do this. I thank you in advance for your help.

Roger

how do you want the punishment to go like ?

 

1st use : kill

2nd use : kick

3rd use : temp ban for x minutes

4th use : permanent ban

 

that was just an example, but if you tell us how u want it i will give u the limit.

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

Originally Posted by rlcale*:

 

Hexacanon,

I Want to kill on each use of the following weapons: (RPG - M320 - SMAW - M15 At MINE)

I don't want the player to get any warnings and I want this to work in all maps of BF3!

Thanks - Roger

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

Originally Posted by HexaCanon*:

 

Hexacanon,

I Want to kill on each use of the following weapons: (RPG - M320 - SMAW - M15 At MINE)

I don't want the player to get any warnings and I want this to work in all maps of BF3!

Thanks - Roger

first check expression (not sure if mines are named M15)

 

Code:

Regex.Match(kill.Weapon, @"(_:M320|RPG|SMAW|M15)", RegexOptions.IgnoreCase).Success
second check code

 

Code:

/* Version: V0.8/R1 */
String kCounter = killer.Name + "_TreatAsOne_Count";
TimeSpan time = TimeSpan.FromSeconds(5); // Activations within 5 seconds count as 1

int warnings = 0;
if (server.Data.issetInt(kCounter)) warnings = server.Data.getInt(kCounter);
    
/*
The first time through, warnings is zero. Whether this is an isolated
activation or the first of a sequence of activations in a short period
of time, do something on this first time through.
*/
String msg = "none";
if (warnings == 0) {
        plugin.KillPlayer(player.Name);
        server.Data.setInt(kCounter, warnings+1);
        return false;
}

/*
The second and subsequent times through, check to make sure we are not
getting multiple activations in a short period of time. Ignore if
less than the time span required.
*/

if (limit.Activations(killer.Name, time) > 1) return false;

/*
We get here only if there was exactly one activation in the time span
*/

if (warnings >= 1) {
        plugin.KillPlayer(player.Name);
        server.Data.setInt(kCounter, warnings+1);
        return false;
}
server.Data.setInt(kCounter, warnings+1);
return false;
it will just kill the player. does not matter which map.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by Singh400*:

 

This is great, but I don't want to give the player any warning message. How will I do that?

Thanks

Roger

It doesn't any warning whatsoever. Which I might add is a bad idea. You need to inform the players as to why you are punishing them.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by rlcale*:

 

you are right, the only time I'll use this is when my brother and I are playing as he has a tendency to only use the items I asked to have him killed on! it seemed to have a message warning in the code but not knowing how the programming works maybe it's disabled. thanks for your help.

Roger

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

Originally Posted by HexaCanon*:

 

you are right, the only time I'll use this is when my brother and I are playing as he has a tendency to only use the items I asked to have him killed on! it seemed to have a message warning in the code but not knowing how the programming works maybe it's disabled. thanks for your help.

Roger

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

Originally Posted by Singh400*:

 

Regex.Match help needed please.

 

What I've currently got (it's a bad word filter):-

 

Code:

List<string> racisms = new List<string>();
	racisms.Add("nigger");
	racisms.Add("niggers");
	racisms.Add("paki");
	racisms.Add("pakis");
	racisms.Add("nigga");
	racisms.Add("niggas");
What it doesn't do is kick with they say !nigger or nigger! I can't tie down the Regex.Match. I was thinking:-

 

Code:

racisms.Add(@"_:niggas");
Here is the entire code:-

 

Code:

string fancy_time = DateTime.Now.ToString("HH:mm:ss");

string fancy_date = DateTime.Now.ToString("yyyy-MM-dd");

List<string> racisms = new List<string>();
	racisms.Add("nigger");
	racisms.Add("niggers");
	racisms.Add("paki");
	racisms.Add("pakis");
	racisms.Add("nigga");
	racisms.Add("niggas");

string[] chatwords = Regex.Split(player.LastChat, @"\s+");
    
foreach(string chatword in chatwords) 
{
	foreach(string racism in racisms)
	{
		if (Regex.Match(chatword, "^"+racism+"$", RegexOptions.IgnoreCase).Success)
		{
			plugin.SendGlobalMessage(plugin.R("%p_n% was auto-kicked for using the word: "+racism+"!"));
			plugin.SendGlobalMessage(plugin.R("We operate a zero tolerance policy on racism"));
			plugin.KickPlayerWithMessage(player.Name, plugin.R("[Auto-Admin] Racist Language"));
			plugin.ConsoleWarn(plugin.R("%p_n% used the word: "+racism+""));
			plugin.ConsoleWarn(plugin.R("%p_n% was auto-kicked for using the word: "+racism+"!"));			
			plugin.Log("Logs/InsaneLimits_BWD.log", plugin.R("[" + fancy_date + "] [" + fancy_time + "] %p_n% said [" + player.LastChat + "]"));
			return true;
			
		}
	}
}

List<string> swears = new List<string>();
	swears.Add("cunt");
	swears.Add("cunts");
	swears.Add("jew");
	swears.Add("jews");
	swears.Add("nazi");
	swears.Add("nazis");
	swears.Add("fag");
	swears.Add("fags");
	swears.Add("faggot");
	swears.Add("faggots");
	swears.Add("homo");
	swears.Add("homos");

string[] chat_words = Regex.Split(player.LastChat, @"\s+");
    
foreach(string chat_word in chat_words) 
{
	foreach(string swear in swears)
	{
		if (Regex.Match(chat_word, "^"+swear+"$", RegexOptions.IgnoreCase).Success)
		{
			plugin.SendGlobalMessage(plugin.R("%p_n% please stop using the word: "+swear+"! This is your only warning!"));
			plugin.ConsoleWarn(plugin.R("%p_n% used the word: "+swear+""));
			plugin.Log("Logs/InsaneLimits_BWD.log", plugin.R("[" + fancy_date + "] [" + fancy_time + "] %p_n% said [" + player.LastChat + "]"));;
			return true;
			
		}
	}
}
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by PapaCharlie9*:

 

Find this line:

 

Code:

if (Regex.Match(chat_word, "^"+racism+"$", RegexOptions.IgnoreCase).Success)
And change it to allow the additional wildcards that you want. For example, if you want to specifically allow ! at the front, you could change it to this:

 

Code:

if (Regex.Match(chat_word, @"^!_"+racism+"$", RegexOptions.IgnoreCase).Success)
Doing it this way fixes it for all the words in your Add list. You don't have to put the wildcards in each and every Add list itself, although it also means the wildcard applies to all words in the Add list.

 

Personally, I'd just do this:

 

Code:

if (Regex.Match(chat_word, @"^[@!#$/]_"+racism+"$", RegexOptions.IgnoreCase).Success)
That's the whole shooting match. Might as well do the same for swear as well.

 

BTW, that method of catching bad words is defeatable by spacing, like: p a k i or even just p aki. The patterns I use look like this:

 

Code:

racisms.Add(@"n\s*[i1]\s*[g9]+\s*[e3]_\s*[ra]");
The \s* means match zero or more whitespace. The [i1] stuff means match either 'i' or '1', since sometimes people try to get around the filter by typing n1993r or whatever. Don't forget the @ at the front of the string, necessary for all the \s stuff.

 

By making the 'e' (or 3) zero or one, e.g., [e3]_, and making the ending 'r' or 'a', that one pattern matches nigger, niggr, nigga and even niggea, lol.

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

Originally Posted by Singh400*:

 

Find this line:

 

Code:

if (Regex.Match(chat_word, "^"+racism+"$", RegexOptions.IgnoreCase).Success)
And change it to allow the additional wildcards that you want. For example, if you want to specifically allow ! at the front, you could change it to this:

 

Code:

if (Regex.Match(chat_word, @"^!_"+racism+"$", RegexOptions.IgnoreCase).Success)
Doing it this way fixes it for all the words in your Add list. You don't have to put the wildcards in each and every Add list itself, although it also means the wildcard applies to all words in the Add list.

 

Personally, I'd just do this:

 

Code:

if (Regex.Match(chat_word, @"^[@!#$/]_"+racism+"$", RegexOptions.IgnoreCase).Success)
That's the whole shooting match. Might as well do the same for swear as well.

 

BTW, that method of catching bad words is defeatable by spacing, like: p a k i or even just p aki. The patterns I use look like this:

 

Code:

racisms.Add(@"n\s*[i1]\s*[g9]+\s*[e3]_\s*[ra]");
The \s* means match zero or more whitespace. The [i1] stuff means match either 'i' or '1', since sometimes people try to get around the filter by typing n1993r or whatever. Don't forget the @ at the front of the string, necessary for all the \s stuff.

 

By making the 'e' (or 3) zero or one, e.g., [e3]_, and making the ending 'r' or 'a', that one pattern matches nigger, niggr, nigga and even niggea, lol.

Thanks, but I don't think I explained myself very well. I don't want to allow them to say ?nigger? where ? = any character. Currently the limit allows them to say jnigger5 and get away with it. I don't want that to happen. Sometimes players say nigger! or get them faggots?. And they aren't kicked or warned as they should be.

 

Edit* Here is what I want to replicate in my bad word limit:-

 

Code:

if ( Regex.Match ( player.LastChat, @"(_:stuck|bugged)", RegexOptions.IgnoreCase ).Success ) 
	{
		string msg1 = "Type @slayme if you are stuck at the deploy screen" ;
		plugin.ServerCommand ( "admin.say" , msg1, "player" , player.Name ) ;
		plugin.ServerCommand ( "admin.yell" , msg1 , "8" , "player" , player.Name ) ;
	}
	
return true;
So with this I could say "omgimstuck" and it would trigger. I want the same for my bad word limit. If I say "omgyouranigger!" it should kick me, but at the moment. It doesn't.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by MDV666*:

 

Hello, help to add please a script for percent of headshots on several types of weapon. For example on group AEK-971, F2000 and M416.

While there is a following:

 

Set limit to evaluate OnKill

Set first_check to this Code:

if (!Regex.Match(kill.Weapon, @"(_:AEK-971|AN-94 Abakan|F2000|M416)", RegexOptions.IgnoreCase).Success) return false;

 

double kills = player[kill.Weapon].KillsRound;

if (kills

double headshots = player[kill.Weapon].HeadshotsRound;

double headshots_percent = Math.Round((headshots / kills)*100.0, 2);

 

if (headshots_percent > 25 && kills > 10)

{

plugin.ConsoleWrite(plugin.R("%p_n% has " + headshots_percent + " headshots percent with "+ kill.Weapon + " after " + kills + " kills"));

return true;

}

 

return false;

Problems:

- in the procon console deduces megmax2000 has 20.43 headshots percent with Weapons/A91/A91 after 5 kills type messages how to send these messages in a chat and the log file?

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

Originally Posted by Singh400*:

 

Problems:

- in the procon console deduces megmax2000 has 20.43 headshots percent with Weapons/A91/A91 after 5 kills type messages how to send these messages in a chat and the log file?

Please use CODE tags when posting code.

 

Try this:-

 

Code:

double kills = player[kill.Weapon].KillsRound;

if ( kills < 1.0 ) 
	return false;

double headshots = player[kill.Weapon].HeadshotsRound;
	
double headshots_percent = Math.Round( ( headshots / kills ) * 100.0, 2 );

if ( headshots_percent > 25 && kills > 10 )
	{
		plugin.ConsoleWrite(plugin.R("%p_n% has " + headshots_percent + " headshots percent with " + kill.Weapon + " after " + kills + " kills"));
		plugin.SendGlobalMessage("%p_n% has " + headshots_percent + " headshots percent with " + kill.Weapon + " after " + kills + " kills");
		plugin.Log("Logs/InsaneLimits_HS.log", plugin.R("%p_n% has " + headshots_percent + " headshots percent with " + kill.Weapon + " after " + kills + " kills"));
		return true;
	}

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

Originally Posted by MDV666*:

 

Please use CODE tags when posting code.

 

Try this:-

 

Code:

double kills = player[kill.Weapon].KillsRound;

if ( kills < 1.0 ) 
	return false;

double headshots = player[kill.Weapon].HeadshotsRound;
	
double headshots_percent = Math.Round( ( headshots / kills ) * 100.0, 2 );

if ( headshots_percent > 25 && kills > 10 )
	{
		plugin.ConsoleWrite(plugin.R("%p_n% has " + headshots_percent + " headshots percent with " + kill.Weapon + " after " + kills + " kills"));
		plugin.SendGlobalMessage("%p_n% has " + headshots_percent + " headshots percent with " + kill.Weapon + " after " + kills + " kills");
		plugin.Log("Logs/InsaneLimits_HS.log", plugin.R("%p_n% has " + headshots_percent + " headshots percent with " + kill.Weapon + " after " + kills + " kills"));
		return true;
	}

return false;
Thanks for the help, but everything works except a chat. The %p_n% variable is written to a chat instead of a name of the player.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by Singh400*:

 

Change:-

 

Code:

plugin.SendGlobalMessage("%p_n% has " + headshots_percent + " headshots percent with " + kill.Weapon + " after " + kills + " kills");
To:

 

Code:

plugin.SendGlobalMessage("" + player.Name + " has " + headshots_percent + " headshots percent with " + kill.Weapon + " after " + kills + " kills");
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by HexaCanon*:

 

i had to change my limits from

 

Code:

!plugin.isInList(player.Name, "White_List")
to

 

Code:

plugin.isInList(player.Name, "White_List") == false
any idea why the first one was not working ?
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by Singh400*:

 

Thanks, but I don't think I explained myself very well. I don't want to allow them to say ?nigger? where ? = any character. Currently the limit allows them to say jnigger5 and get away with it. I don't want that to happen. Sometimes players say nigger! or get them faggots?. And they aren't kicked or warned as they should be.

 

Edit* Here is what I want to replicate in my bad word limit:-

 

Code:

if ( Regex.Match ( player.LastChat, @"(_:stuck|bugged)", RegexOptions.IgnoreCase ).Success ) 
	{
		string msg1 = "Type @slayme if you are stuck at the deploy screen" ;
		plugin.ServerCommand ( "admin.say" , msg1, "player" , player.Name ) ;
		plugin.ServerCommand ( "admin.yell" , msg1 , "8" , "player" , player.Name ) ;
	}
	
return true;
So with this I could say "omgimstuck" and it would trigger. I want the same for my bad word limit. If I say "omgyouranigger!" it should kick me, but at the moment. It doesn't.
I'm bumping this because it's driving me nuts.

 

I've got it to detect when I say *badword (* = any character). But I can't get it to detect badword* (* = any character)

 

I changed:-

 

Code:

if (Regex.Match(chatword, "^"+racism+"$", RegexOptions.IgnoreCase).Success)
To:-

 

Code:

if (Regex.Match(chatword, "^_"+racism+"$", RegexOptions.IgnoreCase).Success)
Do I just replace $ with ??

 

Edit* Tested this:-

 

Code:

if (Regex.Match(chatword, "^_"+racism+"_", RegexOptions.IgnoreCase).Success)
if (Regex.Match(chat_word, "^_"+swear+"_", RegexOptions.IgnoreCase).Success)
And now it works as I want.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by PapaCharlie9*:

 

Thanks, but I don't think I explained myself very well. I don't want to allow them to say ?nigger? where ? = any character. Currently the limit allows them to say jnigger5 and get away with it. I don't want that to happen. Sometimes players say nigger! or get them faggots?. And they aren't kicked or warned as they should be.

 

Edit* Here is what I want to replicate in my bad word limit:-

 

Code:

if ( Regex.Match ( player.LastChat, @"(_:stuck|bugged)", RegexOptions.IgnoreCase ).Success ) 
	{
		string msg1 = "Type @slayme if you are stuck at the deploy screen" ;
		plugin.ServerCommand ( "admin.say" , msg1, "player" , player.Name ) ;
		plugin.ServerCommand ( "admin.yell" , msg1 , "8" , "player" , player.Name ) ;
	}
	
return true;
So with this I could say "omgimstuck" and it would trigger. I want the same for my bad word limit. If I say "omgyouranigger!" it should kick me, but at the moment. It doesn't.
Okay, I understand now, but are you sure? There will be a whole lot more false positives, like if I snigger, or if mention that this map looks like pakistan, etc.

 

Just remove the "^"+ and the +"$" from the Regex.Match if you really want to do this.

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

Originally Posted by PapaCharlie9*:

 

Regarding:

 

i have seen this today

 

http://www.youtube.com/watch_feature...&v=qBN07KWtoZs

 

i wonder if PC can help make the warnings goes up if player goes up in rank fast within say for example 2 minutes.

NEVERMIND! This won't work. I think that player.Rank is only looked-up once, at OnJoin time. I don't think it is updated if the player ranks up during the game.

 

This is not compiled or tested, so you may have to fix some syntax errors.

 

The basic idea here is to remember everyone's rank every time they kill someone and compare for every following kill. If it goes up more than 2 ranks in 1 round, it's suspicious. It ignores Rank

 

Evaluate OnKill, Action is None.

 

first_check Code:

 

Code:

String kRankPrefix = "MyRankIs_";

String key = kRankPrefix + player.Name;
double rank = player.Rank;

if (rank < 5) return false;

if (!plugin.RoundData.issetDouble(key)) {
    plugin.RoundData.setDouble(key, rank);
    return false;
} else {
    rank = plugin.RoundData.getDouble(key);
}

if ((player.Rank - rank) <= 2) return false;

String msg = " jumped up " + (player.Rank-rank) + " ranks this round!"
plugin.ConsoleWrite("^b[Rank Check]^n " + player.FullName + msg);
plugin.SendGlobalMessage(player.FullName + msg);
plugin.KickPlayerWithMessage(player.Name, "You " + msg + " SUSPECTED HACK! Appeal at [email protected]");
return false;
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by Dudenell*:

 

I noticed that insane limits has the ability to send SMS messages. Could I have help setting up a script that would send a SMS to a number if a player types !calladmin, and email would possibly work too.

 

I have a !admin script that would probably only need an edit for SMS messages?

 

This is for on any chat

 

Code:

List<String> info_words = new List<String>();
info_words.Add(@"!admin+(s_)_");
	String[] chat_words = Regex.Split(player.LastChat, @"\s+");
	foreach(String chat_word in chat_words)
		foreach(String info_word in info_words)
            if (Regex.Match(chat_word, "^"+info_word+"$", RegexOptions.IgnoreCase).Success){
			
				if(plugin.isInList(player.Name, "admins")){
					plugin.ServerCommand("admin.yell", (player.Name + " is an admin, so are Dudenell, Adnoble, Gameblaster1, Antunica, and TheShiz22"));
					}
					
				else{
				plugin.PRoConChat("ADMIN > " + player.Name + " requested admin information");
				plugin.ServerCommand("admin.yell", ("Active admins are: Dudenell, Adnoble, Gameblaster1, Antunica, JonnyBiohazard, TheShiz22"),"60", "player", player.Name);
				
				}
			}
   return false;
Also would it be possible to send any other information with the text. EX

 

!calladmin reason here

 

and have reason here sent as the message?

 

Thanks in advance.

 

Edit:

This is what I have

Code:

plugin.SendSMS("United States","Verizon Wireless","315*******","test");
I'm getting this

Code:

[21:56:43 54] [Insane Limits] EXCEPTION: LimitEvaluator11: System.Data.EvaluateException: [Insane Limits] ERROR: uknown SMS country United States
[21:56:43 54] [Insane Limits] Extra information dumped in file InsaneLimits.dump
Code:
-----------------------------------------------
Version: InsaneLimits 0.0.0.8-patch-3-R24-mod
Date: 9/14/2012 9:44:51 PM
Data: 
System.Data.EvaluateException: [^bInsane Limits^n] ^1^bERROR^0^n: uknown SMS country ^bUnited States^n

Stack Trace: 
   at PRoConEvents.InsaneLimits.SendSMS(String country, String carrier, String number, String message)
   at PRoConEvents.LimitEvaluator11.FirstCheck(PlayerInfoInterface player, ServerInfoInterface server, PluginInterface plugin, TeamInfoInterface team1, TeamInfoInterface team2, TeamInfoInterface team3, TeamInfoInterface team4)

MSIL Stack Trace:
    Boolean SendSMS(System.String, System.String, System.String, System.String), IL: 0xC2
    Boolean FirstCheck(PRoConEvents.PlayerInfoInterface, PRoConEvents.ServerInfoInterface, PRoConEvents.PluginInterface, PRoConEvents.TeamInfoInterface, PRoConEvents.TeamInfoInterface, PRoConEvents.TeamInfoInterface, PRoConEvents.TeamInfoInterface), IL: 0x60
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by Singh400*:

 

Find this line:

 

Code:

if (Regex.Match(chat_word, "^"+racism+"$", RegexOptions.IgnoreCase).Success)
And change it to allow the additional wildcards that you want. For example, if you want to specifically allow ! at the front, you could change it to this:

 

Code:

if (Regex.Match(chat_word, @"^!_"+racism+"$", RegexOptions.IgnoreCase).Success)
Doing it this way fixes it for all the words in your Add list. You don't have to put the wildcards in each and every Add list itself, although it also means the wildcard applies to all words in the Add list.

 

Personally, I'd just do this:

 

Code:

if (Regex.Match(chat_word, @"^[@!#$/]_"+racism+"$", RegexOptions.IgnoreCase).Success)
That's the whole shooting match. Might as well do the same for swear as well.

 

BTW, that method of catching bad words is defeatable by spacing, like: p a k i or even just p aki. The patterns I use look like this:

 

Code:

racisms.Add(@"n\s*[i1]\s*[g9]+\s*[e3]_\s*[ra]");
The \s* means match zero or more whitespace. The [i1] stuff means match either 'i' or '1', since sometimes people try to get around the filter by typing n1993r or whatever. Don't forget the @ at the front of the string, necessary for all the \s stuff.

 

By making the 'e' (or 3) zero or one, e.g., [e3]_, and making the ending 'r' or 'a', that one pattern matches nigger, niggr, nigga and even niggea, lol.

Okay, I understand now, but are you sure? There will be a whole lot more false positives, like if I snigger, or if mention that this map looks like pakistan, etc.

 

Just remove the "^"+ and the +"$" from the Regex.Match if you really want to do this.

Ok, I see what you are saying about snigger & nigger. And it's a good point and something I hadn't considered until you mentioned it.

 

But I'd still like the issue I'm having to be solved (or at least partially solved).

 

So at the moment, if I say god damn you niggers - it will kick me. But if I say god damn you niggers! - it doesn't kick me.

 

How do I tell the Regex expression to look for leading and trailing punctuation?

 

Would it be something like this?

 

Code:

if (Regex.Match(chat_word, "^(,!_)"+racism+"(,!_)$", RegexOptions.IgnoreCase).Success)
Edit* I think this is working...

 

Code:

if (Regex.Match(chatword, "^"+racism+"[!_]_$", RegexOptions.IgnoreCase).Success)
* 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.