The online racing simulator
wild card
hi guys is there a way to do * for my clan tag protection such as this

<?php 
   $TeamTagLenghtR 
StrLen"^*[^*S^*C]" );
   
$TeamTagStripR substr$NickName,0,$TeamTagLenghtR );

IF( 
$TeamTagStripR == "^*[^*S^*C]"  )
   
THEN
            
IF( UserInGroup"CP",$UserName ) != )
            
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
?>

Quote from Fire_optikz001 :hi guys is there a way to do * for my clan tag protection such as this

<?php 
   $TeamTagLenghtR 
StrLen"^*[^*S^*C]" );
   
$TeamTagStripR substr$NickName,0,$TeamTagLenghtR );
 
IF( 
$TeamTagStripR == "^*[^*S^*C]"  )
   
THEN
            
IF( UserInGroup"CP",$UserName ) != )
            
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
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.
example?
Quote from Fire_optikz001 :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.
#6 - kyler
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
Quote from kyler :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

nope it works fine come test it if u want
Quote from morpha :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

<?php 
#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

?

FGED GREDG RDFGDR GSFDG