:: :: :: (C) 2022 Maurice "AECX" Henke :: https://henke.gg :: <maurice@henke.gg> :: :: Thank you for using my script! :: If you got any problems feel free to contact me :: net session >nul 2>&1 if %errorLevel% == 0 ( goto Main ) else ( ECHO: ECHO YOU NEED TO RUN THIS SCRIPT AS ADMINISTRATOR ECHO: color c0 goto Quit ) :Main netsh advfirewall firewall show rule name="RiotChat" | findstr Enabled: > tempfile SET empty="" SET /p status=<tempfile DEL tempfile SetLocal EnableDelayedExpansion IF "!status!"==!empty! ( goto Create ) ELSE ( goto Toggle ) EndLocal goto Quit :Create ECHO: ECHO Creating and enabling the firewall rule: netsh advfirewall firewall add rule name="RiotChat" dir=out action=block protocol=TCP remoteport=5223 goto Quit :Toggle setlocal EnableDelayedExpansion if "!status:Yes=!"=="!status!" ( goto Disable ) ELSE ( goto Enable ) endlocal goto Quit :: :: Enable the League chat by disabling :: the firewall rule :: :Enable ECHO Enabling league chat. netsh advfirewall firewall set rule name="RiotChat" new enable=no goto Quit :: :: Disable the League chat by enabling :: the firewall rule :: :Disable ECHO Disabling league chat. netsh advfirewall firewall set rule name="RiotChat" new enable=yes goto Quit :Quit ECHO: ECHO Thank you for using my script, glhf! timeout /t 3 /nobreak > NUL color