Skip to content

Instantly share code, notes, and snippets.

@tmiland
tmiland / Admin Away Commands.cs
Created April 15, 2014 15:23
Insane Limits: Admin Away - Set away status in-game
/* Create a custom list called admins, set it to CaseInsensitive, add all of your admin's names to it.
Create a limit that evaluates OnAnyChat, call it "Admin Away Commands", leave Action set to None.
Set first_check to this Code: */
/* Version 0.9/R1 */
bool isAdmin = plugin.isInList(player.Name, "admins");
Match away = Regex.Match(player.LastChat, @"^\s*!away\s+(.*)$", RegexOptions.IgnoreCase);
Match back = Regex.Match(player.LastChat, @"^\s*!back", RegexOptions.IgnoreCase);
Set limit to evaluate OnAnyChat, set action to None
Set first_check to this Code: */
List<String> hackusations = new List<String>();
// Matching hack, hacker, haxor, hacking, hacks, wallhack
hackusations.Add(@"\b(wall)?ha(ck|xo)(er|ing|ed|s|r)?\b");
// Matching cheat, cheater, cheating, cheats
hackusations.Add(@"\bche(at)(er|ing|ed|s)(s)?\b");
// Matching exploit, exploiter, exploiting, exploits
/* Yell to Squad Members on Request
Set limit to evaluate OnAnyChat, set action to None
Set first_check to this Code:*/
string msg = "none";
if (!player.LastChat.StartsWith("ID_CHAT_"))
return false;