View Full Version : wild card
Fire_optikz001
29th October 2009, 23:53
hi guys is there a way to do * for my clan tag protection such as this
$TeamTagLenghtR = StrLen( "^*[^*S^*C]" );
$TeamTagStripR = substr( $NickName,0,$TeamTagLenghtR );
IF( $TeamTagStripR == "^*[^*S^*C]" )
THEN
IF( UserInGroup( "CP",$UserName ) != 1 )
THEN
privMsg( "^1You Are Not Allowed To Use The " . $Team . "^1 Tag");
cmdLFS("/msg ^1" . $UserName . " ^1Was Kicked For Using" );
cmdLFS("/msg ^1The " . $Team . " ^1Tag When Not A " . $Team . " ^1Member" );
cmdLFS("/kick " . GetCurrentPlayerVar("UserName") );
ENDIF
ENDIF
Bass-Driver
30th October 2009, 16:25
hi guys is there a way to do * for my clan tag protection such as this
$TeamTagLenghtR = StrLen( "^*[^*S^*C]" );
$TeamTagStripR = substr( $NickName,0,$TeamTagLenghtR );
IF( $TeamTagStripR == "^*[^*S^*C]" )
THEN
IF( UserInGroup( "CP",$UserName ) != 1 )
THEN
privMsg( "^1You Are Not Allowed To Use The " . $Team . "^1 Tag");
cmdLFS("/msg ^1" . $UserName . " ^1Was Kicked For Using" );
cmdLFS("/msg ^1The " . $Team . " ^1Tag When Not A " . $Team . " ^1Member" );
cmdLFS("/kick " . GetCurrentPlayerVar("UserName") );
ENDIF
ENDIF
i think it will give an error
u must do :
IF( $TeamTagStripR == "^1[^1S^1C] || ^2[^2S^2C] || enc" )
or
IF( $TeamTagStripR == tags in textfile
morpha
30th October 2009, 18:40
Either use regex or strip colours before comparing the strings.
I'd recommend the latter, although it might involve regex just the same, depending on your / Lapper's implementation.
Fire_optikz001
30th October 2009, 20:33
example?
morpha
31st October 2009, 10:30
example?
Can't give you one as I don't use Lapper nor C#, I'd be really surprised if Lapper doesn't come with a function to strip colours from a string though.
kyler
1st November 2009, 19:37
You might just need to make a username file. Make a list of usernames that members from past experience if u just use [SC] then if anyone came into the server and added [SC] to there name they could wipe the server. But then again idk about lapper so it might have a protection. Just a tip:thumb:
Fire_optikz001
1st November 2009, 20:25
You might just need to make a username file. Make a list of usernames that members from past experience if u just use [SC] then if anyone came into the server and added [SC] to there name they could wipe the server. But then again idk about lapper so it might have a protection. Just a tip:thumb:
nope :) it works fine come test it if u want :)
Fire_optikz001
1st November 2009, 20:42
Either use regex or strip colours before comparing the strings.
I'd recommend the latter, although it might involve regex just the same, depending on your / Lapper's implementation.
:O look what i found
#Example: if UseUsernameForAuthentication=true
# !regex=^\[COP\].*
# Find all user with a nickname that begins with [COP]
# regex=^Gai.*
# Find all user with a username that begins with Gai
# See regular expression on web for more info how it work
so would i do
IF( $TeamTagStripR == !regex=^\[SC\].* )
THEN
IF( UserInGroup( "CP",$UserName ) != 1 )
THEN
privMsg( "^1You Are Not Allowed To Use The " . $Team . "^1 Tag");
cmdLFS("/msg ^1" . $UserName . " ^1Was Kicked For Using" );
cmdLFS("/msg ^1The " . $Team . " ^1Tag When Not A " . $Team . " ^1Member" );
cmdLFS("/kick " . GetCurrentPlayerVar("UserName") );
ENDIF
ENDIF?
vBulletin® v3.8.6, Copyright ©2000-2012, Jelsoft Enterprises Ltd.