############################################################################# # JoinFilter.LPR by Bass-Driver ############################################################################# # This addon allows a server/Lapper admin to set midrace joining # and how many times a player is allowed to join a race in progress. ############################################################################# # # Required Lapperversion: 7.0.4.0 or higher # ############################################################################# #V1.0 First Public version # -Initial release ############################################################################# ################################################# #Event executes when Lapper starts # ################################################# CatchEvent OnLapperStart() GlobalVar $TypeOfActions; $TypeOfActions[1] = "No Action"; $TypeOfActions[2] = "kick"; $TypeOfActions[3] = "ban"; $TypeOfActions[4] = "No Rejoin"; $TypeOfActions[5] = "spec"; #For Future releases GlobalVar $BanActionTime; $BanActionTime[1] = 0; #12 Hours $BanActionTime[2] = 1; #24 Hours $BanActionTime[3] = 2; #48 Hours $BanActionTime[4] = 7; #07 Days #System parameters GlobalVar $Allow_MidRaceJoin; $Allow_MidRaceJoin = 1; #This will override Server Midrace join parameter!!!!! GlobalVar $Enable_LimitedJoins; $Enable_LimitedJoins = 0; #Set option to enable/disable this script GlobalVar $Enable_PlayerCount; $Enable_PlayerCount = 1; #Set number of player to enable LimitedJoin script. #Rejoins parameters GlobalVar $MaxNumberOfRejoins; $MaxNumberOfRejoins = 5; #Max Number of allowed rejoinings GlobalVar $MaxRejoinsToAction; $MaxRejoinsToAction = 5; #Max Number of allowed rejoinings till action (Counts when Max number of Rejoin has been exceeded) GlobalVar $MaxRejoinsTypeOfAction; $MaxRejoinsTypeOfAction = 1; #See $TypeOfActions; #Spectatings parameters GlobalVar $MaxNumberOfSpecs; $MaxNumberOfSpecs = -1; #How many times a player is allowed to spectate (Spec/pit/wrongway/speeding pitlane etc) GlobalVar $MaxSpecsTypeOfAction; $MaxSpecsTypeOfAction = 4; #See $TypeOfActions; #Values to verify with LFS parameters GlobalVar $DisAllowJoinRaceProgressLaps; $DisAllowJoinRaceProgressLaps = 1; #DisAllow join race after set Laps GlobalVar $DisAllowJoinRaceProgressMin; $DisAllowJoinRaceProgressMin = -1; #DisAllow join race after set Mins GlobalVar $DisAllowJoinRaceProgressSec; $DisAllowJoinRaceProgressSec = -1; #DisAllow join race after set Secs #Global Variables GlobalVar $LapsElapsed; $LapsElapsed = 0; EndCatchEvent ################################################# #Connect messages when a player joins the server# ################################################# CatchEvent OnConnect( $userName ) IF($Enable_LimitedJoins == 1) THEN SetPlayerVar($userName,"CounterJoinedRace",0); SetPlayerVar($userName,"CounterFailedJoinedRace",0); SetPlayerVar($userName,"CounterSpectatings",0); ENDIF EndCatchEvent ################################################# #New Player joining race or leaving pits # ################################################# CatchEvent OnNewPlayerJoin( $userName ) IF($Enable_LimitedJoins == 1) THEN JoinFilter_Check($userName); ENDIF EndCatchEvent ################################################# #When a race starts # ################################################# CatchEvent OnRaceStart( $NumP ) # Lapper event $LapsElapsed = GetLapperVar("racelaps") - GetLapperVar("racelapsleft"); IF($LapsElapsed == GetLapperVar("racelaps")) THEN $LapsElapsed = 0; ENDIF $RacersInServer = getListOfPlayers("U"); FOREACH( $maVar IN $RacersInServer ) SetPlayerVar($maVar["value"],"CounterJoinedRace",0); SetPlayerVar($maVar["value"],"CounterFailedJoinedRace",0); SetPlayerVar($maVar["value"],"CounterSpectatings",0); ENDFOREACH EndCatchEvent ################################################# #When a player teleported to pit () Shift + P # ################################################# CatchEvent OnPit( $userName ) IF($Enable_LimitedJoins == 1) THEN CheckSpectatings($userName); ENDIF EndCatchEvent ################################################# #When a leaves the race # ################################################# CatchEvent OnLeaveRace( $userName ) IF($Enable_LimitedJoins == 1) THEN CheckSpectatings($userName); ENDIF EndCatchEvent ################################################# #Command/Text actions # ################################################# CatchEvent OnMSO( $userName, $text ) # Player event $idxOfFirtsSpace = indexOf( $text, " "); IF( $idxOfFirtsSpace == -1 ) THEN $command = $text; $argv = ""; ELSE $command = subStr( $text,0,$idxOfFirtsSpace ); $argv = trim( subStr( $text,$idxOfFirtsSpace ) ); ENDIF SWITCH( $command ) CASE "!rejoinfilter": IF ( UserIsAdmin( $userName ) == 1 ) THEN JoinFilter_Menu($userName); ENDIF BREAK; CASE "!debuglfspara": IF ( UserIsAdmin( $userName ) == 1 ) THEN $LapsElapsed = GetLapperVar("racelaps") - GetLapperVar("racelapsleft"); PrivMsg("RaceInProgress: ".GetLapperVar("raceinprog")); PrivMsg("Set RaceLaps: ".GetLapperVar("racelaps")); PrivMsg("Set RaceHours: ".GetLapperVar("racehours")); PrivMsg("RaceLaps Left: ".GetLapperVar("racelapsleft")); PrivMsg("RaceLaps Elapsed: ".$LapsElapsed); PrivMsg("RaceMin Elapsed: ".GetLapperVar("elapsedmins")); PrivMsg("RaceSec Elapsed: ".GetLapperVar("elapsedsecs")); PrivMsg("RaceTime Elapsed: ".GetLapperVar("RaceTime")); ENDIF BREAK; CASE "!testrejoin": IF ( UserIsAdmin( $userName ) == 1 ) THEN JoinFilter_Check($userName); ENDIF BREAK; ENDSWITCH EndCatchEvent Sub JoinFilter_Menu($userName) #Design $JF_HT = 52; openPrivButton( "JF_bgdlight",75,$JF_HT,50,56,5,-1,16, ""); openPrivButton( "JF_bgddark",76,$JF_HT+2,48,53,5,-1,32, ""); openPrivButton( "JF_title",76,$JF_HT+2,48,6,10,-1,32, "^7Rejoin filter settings"); openPrivButton( "JF_close",76,$JF_HT+50,48,5,10,-1,32, "^7Close",CloseJoinFilterSettings); openPrivButton( "JF_Enabletitle",76,$JF_HT+9,30,4,10,-1,80, "^0Enable joinFilter:"); openPrivButton( "JF_NrOfPlytitle",76,$JF_HT+13,30,4,10,-1,80, "^0Number of Players to enable filter:"); openPrivButton( "JF_MaxofRejoinstitle",76,$JF_HT+17,30,4,10,-1,80, "^0Maximum of Rejoins:"); openPrivButton( "JF_MaxofFailedRejoinstitle",76,$JF_HT+21,30,4,10,-1,80, "^0Set maximum of failed rejoins:"); openPrivButton( "JF_TypeActionstitle",76,$JF_HT+25,30,4,10,-1,80, "^0Action exceed max failed rejoins:"); openPrivButton( "JF_Lapstitle",76,$JF_HT+29,30,4,10,-1,80, "^0Set laps to allow rejoin:"); openPrivButton( "JF_Minstitle",76,$JF_HT+33,30,4,10,-1,80, "^0Set minutes to allow rejoin:"); openPrivButton( "JF_Secsstitle",76,$JF_HT+37,30,4,10,-1,80, "^0Set seconds to allow rejoin:"); openPrivButton( "JF_MaxSpecstitle",76,$JF_HT+41,30,4,10,-1,80, "^0Set maximum spectatings:"); openPrivButton( "JF_TypeMaxSpecstitle",76,$JF_HT+45,30,4,10,-1,80, "^0Action exceed of spectatings:"); ###Functions### #Enable JoinFilter IF($Enable_LimitedJoins == 1)THEN openPrivButton( "JF_Enable_Set",106,$JF_HT+9,18,4,10,-1,32+4,"^2ON",EnableJoinFilter); ELSE openPrivButton( "JF_Enable_Set",106,$JF_HT+9,18,4,10,-1,32+5,"^1OFF",EnableJoinFilter); ENDIF ##Set PlayerCount (Connected players in the server) openPrivButton( "JF_Ply_Count",106,$JF_HT+13,6,4,10,-1,32, "^3".$Enable_PlayerCount); openPrivButton( "JF_Ply_Now",112,$JF_HT+13,6,4,10,-1,32, "^0".GetLapperVar("numconns")-1); openPrivTextButton( "JF_Ply_Set",118,$JF_HT+13,6,4,10,16, "^0Set Number of players to enable join filter","^3Set",2,SetPlayerCount); ##Set Maximum of rejoins openPrivButton( "JF_Rejoins_Count",106,$JF_HT+17,12,4,10,-1,32, "^3".$MaxNumberOfRejoins); openPrivTextButton( "JF_Rejoins_Set",118,$JF_HT+17,6,4,10,16, "^0Set maximum rejoins","^3Set",2,SetMaxRejoins); ##Set Maximum of failed rejoins IF($MaxRejoinsToAction == -1) THEN openPrivButton( "JF_FailedRejoins_Count",106,$JF_HT+21,12,4,10,-1,32+5, "Disabled"); ELSE openPrivButton( "JF_FailedRejoins_Count",106,$JF_HT+21,12,4,10,-1,32, "^3".$MaxRejoinsToAction); ENDIF openPrivTextButton( "JF_FailedRejoins_Set",118,$JF_HT+21,6,4,10,16, "^0Set maximum bad rejoins 1-20 (-1 = disabled) ","^3Set",2,SetMaxFailedRejoins); ##Set Action Maximum of failed rejoins openPrivButton( "JF_TypeAction",106,$JF_HT+25,12,4,10,-1,32+6, "".$TypeOfActions[ToNum($MaxRejoinsTypeOfAction)]); openPrivTextButton( "JF_TypeAction_Set",118,$JF_HT+25,6,4,10,16, "^0 1 = No Action, 2 = Kick, 3 = Ban","^3Set",1,SetActionMaxRejoins); ##Set Laps to allow joining IF($DisAllowJoinRaceProgressLaps == -1) THEN openPrivButton( "JF_Laps_Count",106,$JF_HT+29,12,4,10,-1,32+5, "Disabled"); ELSE IF(GetLapperVar("RaceLaps") != 0) THEN openPrivButton( "JF_Laps_Count",106,$JF_HT+29,6,4,10,-1,32, "^3".$DisAllowJoinRaceProgressLaps); openPrivButton( "JF_Laps_Now",112,$JF_HT+29,6,4,10,-1,32, "^0".GetLapperVar("RaceLaps")); ELSE openPrivButton( "JF_Laps_Count",106,$JF_HT+29,12,4,10,-1,32, "^6Practise mode!"); ENDIF closeprivbutton("JF_Mins_Now&JF_Secs_Now"); ENDIF openPrivTextButton( "JF_Laps_Set",118,$JF_HT+29,6,4,10,16, "^0Set Number of Laps 1-99","^3Set",2,SetLapsToRejoin); ##Set Mins to allow joining IF($DisAllowJoinRaceProgressMin == -1) THEN openPrivButton( "JF_Mins_Count",106,$JF_HT+33,12,4,10,-1,32+5, "Disabled"); ELSE openPrivButton( "JF_Mins_Count",106,$JF_HT+33,6,4,10,-1,32, "^3".$DisAllowJoinRaceProgressMin); openPrivButton( "JF_Mins_Now",112,$JF_HT+33,6,4,10,-1,32, "^0".Round(GetLapperVar("elapsedmins"),0)); closeprivbutton("JF_Laps_Now&JF_Secs_Now"); ENDIF openPrivTextButton( "JF_Mins_Set",118,$JF_HT+33,6,4,10,16, "^0Set amount of minutes to allow rejoining 1-60","^3Set",2,SetMinsToRejoin); ##Set Secs to allow joining IF($DisAllowJoinRaceProgressSec == -1) THEN openPrivButton( "JF_Secs_Count",106,$JF_HT+37,12,4,10,-1,32+5, "Disabled"); ELSE openPrivButton( "JF_Secs_Count",106,$JF_HT+37,6,4,10,-1,32, "^3".$DisAllowJoinRaceProgressSec); openPrivButton( "JF_Secs_Now",112,$JF_HT+37,6,4,10,-1,32, "^0".Round(GetLapperVar("elapsedSecs"),0)); closeprivbutton("JF_Laps_Now&JF_Mins_Now"); ENDIF openPrivTextButton( "JF_Secs_Set",118,$JF_HT+37,6,4,10,16, "^0Set amount of seconds to allow rejoining 1-120","^3Set",3,SetSecsToRejoin); ##Set Maximum of Spectatings IF($MaxNumberOfSpecs == -1) THEN openPrivButton( "JF_Spectatings_Count",106,$JF_HT+41,12,4,10,-1,32+5, "Disabled"); ELSE openPrivButton( "JF_Spectatings_Count",106,$JF_HT+41,12,4,10,-1,32, "^3".$MaxNumberOfSpecs); ENDIF openPrivTextButton( "JF_Spectatings_Set",118,$JF_HT+41,6,4,10,16, "^0Set maximum spectatings","^3Set",2,SetMaxSpectatings); ##Set Action Maximum of failed rejoins openPrivButton( "JF_TypeActionSpec",106,$JF_HT+45,12,4,10,-1,32+6, "".$TypeOfActions[ToNum($MaxSpecsTypeOfAction)]); openPrivTextButton( "JF_TypeActionSpec_Set",118,$JF_HT+45,6,4,10,16, "^0 1 = No Action, 2 = Kick, 3 = Ban, 4 = No Rejoin","^3Set",1,SetActionMaxSpectatings); EndSub #CLOSE BUTTONS Sub closeButtonRegex ( $userName, $exp ) $lob = getListOfPlayerButtons( $userName ); FOREACH ( $de in $lob ) $nameOfButton = $de["value"]; IF ( isRegexMatch( $exp, $nameOfButton ) == 1 ) THEN closeButton ( $userName, $nameOfButton ); ENDIF ENDFOREACH EndSub Sub CloseJoinFilterSettings($keyflags,$id) $userName = GetCurrentPlayerVar("UserName"); $exp ="JF_"; closeButtonRegex ( $userName, $exp ); EndSub ################################################# #Sub Callbacks # ################################################# Sub EnableJoinFilter($keyflags,$id) IF($Enable_LimitedJoins == 1)THEN $Enable_LimitedJoins = 0; cmdLFS("/midrace=1"); ELSE $Enable_LimitedJoins = 1; cmdLFS("/midrace=1"); ENDIF $RacersInServer = getListOfPlayers("U"); FOREACH( $maVar IN $RacersInServer ) SetPlayerVar($maVar["value"],"CounterJoinedRace",0); SetPlayerVar($maVar["value"],"CounterFailedJoinedRace",0); SetPlayerVar($maVar["value"],"CounterSpectatings",0); ENDFOREACH JoinFilter_Menu(GetCurrentPlayerVar("UserName")); EndSub Sub SetPlayerCount($id,$argv) IF(IsNum($argv) == 1)THEN IF( ToNum($argv) <= 48 && ToNum($argv) >= 0) THEN $Enable_PlayerCount = $argv; ELSE privmsg("^3Wrong value: ^81 - 48"); ENDIF ENDIF JoinFilter_Menu(GetCurrentPlayerVar("UserName")); EndSub Sub SetMaxRejoins($id,$argv) IF(IsNum($argv) == 1)THEN IF( ToNum($argv) <= 20 && ToNum($argv) >= 1) THEN $MaxNumberOfRejoins = $argv; ELSE privmsg("^3Wrong value: ^81 - 20"); ENDIF ENDIF JoinFilter_Menu(GetCurrentPlayerVar("UserName")); EndSub Sub SetMaxFailedRejoins($id,$argv) IF(IsNum($argv) == 1)THEN IF( ToNum($argv) <= 20 && ToNum($argv) >= -1) THEN $MaxRejoinsToAction = $argv; ELSE privmsg("^3Wrong value: ^81 - 20. ^1-1 is disable option"); ENDIF ENDIF JoinFilter_Menu(GetCurrentPlayerVar("UserName")); EndSub Sub SetActionMaxRejoins($id,$argv) IF(IsNum($argv) == 1)THEN IF( ToNum($argv) <= 3 && ToNum($argv) >= 1) THEN $MaxRejoinsTypeOfAction = $argv; ELSE privmsg("^3Wrong value: ^81 = No Action, 2 = Kick, 3 = Ban"); ENDIF ENDIF JoinFilter_Menu(GetCurrentPlayerVar("UserName")); EndSub Sub SetLapsToRejoin($id,$argv) IF(IsNum($argv) == 1)THEN IF( ToNum($argv) <= 99 && ToNum($argv) >= 1) THEN $DisAllowJoinRaceProgressLaps = $argv; $DisAllowJoinRaceProgressMin = -1; $DisAllowJoinRaceProgressSec = -1; ELSE privmsg("^3Wrong value: ^81 - 99"); ENDIF ENDIF JoinFilter_Menu(GetCurrentPlayerVar("UserName")); EndSub Sub SetMinsToRejoin($id,$argv) IF(IsNum($argv) == 1)THEN IF( ToNum($argv) <= 60 && ToNum($argv) >= 1) THEN $DisAllowJoinRaceProgressLaps = -1; $DisAllowJoinRaceProgressMin = $argv; $DisAllowJoinRaceProgressSec = -1; ELSE privmsg("^3Wrong value: ^81 - 60"); ENDIF ENDIF JoinFilter_Menu(GetCurrentPlayerVar("UserName")); EndSub Sub SetSecsToRejoin($id,$argv) IF(IsNum($argv) == 1)THEN IF( ToNum($argv) <= 120 && ToNum($argv) >= 1) THEN $DisAllowJoinRaceProgressLaps = -1; $DisAllowJoinRaceProgressMin = -1; $DisAllowJoinRaceProgressSec = $argv; ELSE privmsg("^3Wrong value: ^81 - 60"); ENDIF ENDIF JoinFilter_Menu(GetCurrentPlayerVar("UserName")); EndSub Sub SetMaxSpectatings($id,$argv) IF(IsNum($argv) == 1)THEN IF( ToNum($argv) <= 20 && ToNum($argv) >= -1) THEN $MaxNumberOfSpecs = $argv; ELSE privmsg("^3Wrong value: ^81 - 20 ^1-1 is disable option"); ENDIF ENDIF JoinFilter_Menu(GetCurrentPlayerVar("UserName")); EndSub Sub SetActionMaxSpectatings($id,$argv) IF(IsNum($argv) == 1)THEN IF( ToNum($argv) <= 4 && ToNum($argv) >= 1) THEN $MaxSpecsTypeOfAction = $argv; ELSE privmsg("^3Wrong value: ^81 = No Action, 2 = Kick, 3 = Ban, 4 = No Rejoin"); ENDIF ENDIF JoinFilter_Menu(GetCurrentPlayerVar("UserName")); EndSub ################################################# # # ################################################# Sub JoinFilter_Check($userName) IF((GetLapperVar("racelaps") != 0)||(GetLapperVar("racehours") != 0)) THEN IF (GetLapperVar("raceinprog") == 1) THEN IF ($Allow_MidRaceJoin == 1) THEN IF($Enable_LimitedJoins == 1) THEN ##Get number of players in the server IF((GetLapperVar("numconns")-1) > ToNum($Enable_PlayerCount))THEN $DisAllow = 1; SetPlayerVar($userName,"CounterJoinedRace",GetPlayerVar($userName,"CounterJoinedRace") + 1); #Retreive Laps/RaceTime from LFS IF((GetPlayerVar($userName,"CounterFailedJoinedRace") < $MaxRejoinsToAction)||($MaxRejoinsToAction == -1)) THEN $LapsElapsed = GetLapperVar("racelaps") - GetLapperVar("racelapsleft"); $RaceMinElapsed = Round(GetLapperVar("elapsedmins"),0); $RaceSecElapsed = Round(GetLapperVar("elapsedsecs"),0); IF($LapsElapsed == GetLapperVar("racelaps")) THEN $LapsElapsed = 0; ENDIF ##Laps/Min/Sec comparison with set values. #RaceLaps Enabled IF((($DisAllowJoinRaceProgressLaps != -1) && ($LapsElapsed <= $DisAllowJoinRaceProgressLaps)) && ($DisAllowJoinRaceProgressMin == -1) && ($DisAllowJoinRaceProgressSec == -1)) THEN $DisAllow = 0; ELSE #RaceMinutes Enabled IF(($DisAllowJoinRaceProgressLaps == -1) && (($DisAllowJoinRaceProgressMin != -1) && ($RaceMinElapsed <= $DisAllowJoinRaceProgressMin)) && ($DisAllowJoinRaceProgressSec == -1)) THEN $DisAllow = 0; ELSE #RaceMinutes Enabled IF(($DisAllowJoinRaceProgressLaps == -1) && ($DisAllowJoinRaceProgressMin == -1) && (($DisAllowJoinRaceProgressSec != -1) && ($RaceSecElapsed <= $DisAllowJoinRaceProgressSec))) THEN $DisAllow = 0; ENDIF ENDIF ENDIF ##Message to player IF($DisAllow == 1) THEN SetPlayerVar($userName,"CounterFailedJoinedRace",GetPlayerVar($userName,"CounterFailedJoinedRace") + 1); privmsg("^1NOT allowed to join the race in progress: ^8(".GetPlayerVar($userName,"CounterFailedJoinedRace")."/".$MaxRejoinsToAction.")"); cmdLFS("/".$TypeOfActions[5]." ".$userName); ELSE IF($DisAllow == 0) THEN IF(GetPlayerVar($userName,"CounterJoinedRace") <= ToNum($MaxNumberOfRejoins)) THEN privmsg("^7Allowed to join ^8(".GetPlayerVar($userName,"CounterJoinedRace")."/".$MaxNumberOfRejoins.")"); ELSE SetPlayerVar($userName,"CounterFailedJoinedRace",GetPlayerVar($userName,"CounterFailedJoinedRace") + 1); privmsg("^1NOT allowed to join the race in progress: ^8(".GetPlayerVar($userName,"CounterFailedJoinedRace")."/".$MaxRejoinsToAction.")"); cmdLFS("/".$TypeOfActions[5]." ".$userName); ENDIF ENDIF ENDIF ELSE #Kick/Ban IF ($MaxRejoinsTypeOfAction == 2) THEN Globalmsg(">".GetPlayerVar($userName,"NickName")." has been ^3KICKED ^7for exceeding the amount of bad rejoins"); privmsg("^7You have been ^3KICKED ^7for exceeding the amount of bad rejoins"); cmdLFS("/".$TypeOfActions[5]." ".$userName); #cmdLFS("/".$TypeOfActions[ToNum($MaxRejoinsTypeOfAction)]." ".$userName); ENDIF IF ($MaxRejoinsTypeOfAction == 3) THEN Globalmsg(">".GetPlayerVar($userName,"NickName")." has been ^3Banned ^7for exceeding the amount of bad rejoins"); privmsg("^1You have been ^3BANNED ^7for 12 hours for exceeding the amount of bad rejoins"); cmdLFS("/".$TypeOfActions[5]." ".$userName); #cmdLFS("/".$TypeOfActions[ToNum($MaxRejoinsTypeOfAction)]." ".$userName." ".$BanActionTime[1]); ENDIF ENDIF ENDIF ENDIF ENDIF ENDIF ENDIF EndSub Sub CheckSpectatings($userName) IF($MaxNumberOfSpecs != -1) THEN IF(GetPlayerVar($userName,"CounterSpectatings") < $MaxNumberOfSpecs) THEN SetPlayerVar($userName,"CounterSpectatings",GetPlayerVar($userName,"CounterSpectatings") + 1); privmsg("^7Allowed to spectate/pit ^8(".GetPlayerVar($userName,"CounterSpectatings")."/".$MaxNumberOfSpecs.")"); ELSE #Kick/Ban/No rejoin IF(GetPlayerVar($userName,"CounterJoinedRace") <= $MaxNumberOfRejoins) THEN IF ($MaxSpecsTypeOfAction == 2) THEN Globalmsg(">".GetPlayerVar($userName,"NickName")." has been ^3KICKED ^7for exceeding the amount of spectatings"); privmsg("^7You have been ^3KICKED ^7for exceeding the amount of false rejoins"); #cmdLFS("/".$TypeOfActions[ToNum($MaxRejoinsTypeOfAction)]); ENDIF IF ($MaxSpecsTypeOfAction == 3) THEN Globalmsg(">".GetPlayerVar($userName,"NickName")." has been ^3Banned ^7for exceeding the amount of spectatings"); privmsg("^1You have been ^3BANNED ^7for 12 hours for exceeding the amount of false rejoins"); #cmdLFS("/".$TypeOfActions[ToNum($MaxRejoinsTypeOfAction)]." ".$userName." ".$BanActionTime[1]); ENDIF IF ($MaxSpecsTypeOfAction == 4) THEN Globalmsg(">".GetPlayerVar($userName,"NickName")." may not ^3Rejoin anymore ^7for exceeding the amount of spectatings"); privmsg("^7You may not ^3Rejoin ^7anymore for exceeding the amount of spectatings"); SetPlayerVar($userName,"CounterJoinedRace",$MaxNumberOfRejoins); ENDIF ENDIF ENDIF ENDIF EndSub