userdata["acclevel"] < 80) die ("Access denied!"); $edlist = new EditList("id", "hlstats_ClanTags", "clan", false); $edlist->columns[] = new EditListColumn("pattern", "Pattern", 40, true, "text", "", 64); $edlist->columns[] = new EditListColumn("position", "Match Position", 0, true, "select", "EITHER/EITHER;START/START only;END/END only"); if ($_POST) { if ($edlist->update()) message("success", "Operation successful."); else message("warning", $edlist->error()); } ?> Here you can define the patterns used to determine what clan a player is in. These patterns are applied to players' names when they connect or change name.
Special characters in the pattern:
Character | Description |
A | Matches one character (i.e. a character is required) |
X | Matches zero or one characters (i.e. a character is optional) |
a | Matches literal A or a |
x | Matches literal X or x |
Example patterns:
Pattern | Description | Example |
[AXXXXX] | Matches 1 to 6 characters inside square braces | [ZOOM]Player |
{AAXX} | Matches 2 to 4 characters inside curly braces | {S3G}Player |
rex>> | Matches the string "rex>>", "REX>>", etc. | REX>>Tyranno |
Avoid adding patterns to the database that are too generic. Always ensure you have at least one literal (non-special) character in the pattern -- for example if you were to add the pattern "AXXA", it would match any player with 2 or more letters in their name!
The Match Position field sets which end of the player's name the clan tag is allowed to appear.
query(" SELECT id, pattern, position FROM hlstats_ClanTags ORDER BY id "); $edlist->draw($result); ?>