ImportBot Posted September 8, 2012 Author Share Posted September 8, 2012 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
ImportBot Posted September 8, 2012 Author Share Posted September 8, 2012 Originally Posted by HexaCanon*: PapaCharlie9* said: 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
ImportBot Posted September 8, 2012 Author Share Posted September 8, 2012 Originally Posted by Singh400*: PapaCharlie9* said: 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
ImportBot Posted September 10, 2012 Author Share Posted September 10, 2012 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
ImportBot Posted September 10, 2012 Author Share Posted September 10, 2012 Originally Posted by HexaCanon*: rlcale* said: 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
ImportBot Posted September 10, 2012 Author Share Posted September 10, 2012 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
ImportBot Posted September 10, 2012 Author Share Posted September 10, 2012 Originally Posted by HexaCanon*: rlcale* said: 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).Successsecond 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
ImportBot Posted September 11, 2012 Author Share Posted September 11, 2012 Originally Posted by rlcale*: This is great, but I don't want to give the player any warning message. How will I do that? Thanks Roger * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted September 11, 2012 Author Share Posted September 11, 2012 Originally Posted by Singh400*: rlcale* said: 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
ImportBot Posted September 11, 2012 Author Share Posted September 11, 2012 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
ImportBot Posted September 11, 2012 Author Share Posted September 11, 2012 Originally Posted by HexaCanon*: rlcale* said: 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 * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted September 12, 2012 Author Share Posted September 12, 2012 Originally Posted by pharbehind*: Can we get Yell next map to work with AK? Nevermind, easy edit on my own. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted September 12, 2012 Author Share Posted September 12, 2012 Originally Posted by Singh400*: pharbehind* said: Can we get Yell next map to work with AK? Nevermind, easy edit on my own. https://github.com/Singh400/insane-l...xt-Map-Command * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted September 13, 2012 Author Share Posted September 13, 2012 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
ImportBot Posted September 13, 2012 Author Share Posted September 13, 2012 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
ImportBot Posted September 13, 2012 Author Share Posted September 13, 2012 Originally Posted by Singh400*: PapaCharlie9* said: 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
ImportBot Posted September 13, 2012 Author Share Posted September 13, 2012 Originally Posted by LumpyNutZ*: Tried to search but didnt found. So is there a votamp limits for IL? If not lets take this as request * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted September 13, 2012 Author Share Posted September 13, 2012 Originally Posted by HexaCanon*: LumpyNutZ* said: Tried to search but didnt found. So is there a votamp limits for IL? If not lets take this as request would love to see that * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted September 13, 2012 Author Share Posted September 13, 2012 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
ImportBot Posted September 13, 2012 Author Share Posted September 13, 2012 Originally Posted by Singh400*: MDV666* said: 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
ImportBot Posted September 13, 2012 Author Share Posted September 13, 2012 Originally Posted by MDV666*: Singh400* said: 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
ImportBot Posted September 13, 2012 Author Share Posted September 13, 2012 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
ImportBot Posted September 13, 2012 Author Share Posted September 13, 2012 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") == falseany idea why the first one was not working ? * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted September 14, 2012 Author Share Posted September 14, 2012 Originally Posted by Singh400*: Try:- Code: if (!plugin.isInList(player.Name, "White_List"))It means if the player isn't in the whitelist, yes? * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted September 14, 2012 Author Share Posted September 14, 2012 Originally Posted by Singh400*: Singh400* said: 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
ImportBot Posted September 14, 2012 Author Share Posted September 14, 2012 Originally Posted by PapaCharlie9*: Singh400* said: 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
ImportBot Posted September 14, 2012 Author Share Posted September 14, 2012 Originally Posted by PapaCharlie9*: Regarding: HexaCanon* said: 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 xxx@yyy.com"); return false; * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted September 14, 2012 Author Share Posted September 14, 2012 Originally Posted by MDV666*: thank you very much! * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted September 15, 2012 Author Share Posted September 15, 2012 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 thisCode: [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.dumpCode: ----------------------------------------------- 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
ImportBot Posted September 15, 2012 Author Share Posted September 15, 2012 Originally Posted by Singh400*: PapaCharlie9* said: 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. PapaCharlie9* said: 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
Recommended Posts
Archived
This topic is now archived and is closed to further replies.