Just for explaining this:
Methode 1
I wrote a similar Programm by myself. What this programm does is just adding these lines to your "hosts" file to route riot's chat packets from your machine to "localhost" which means your own PC.
To find out, what the server is the program is crawling your LoL directory to find the "lol.properties" file to get the information which is needed.
For example this line:
Code:
xmpp_server_url=chat.euw1.lol.riotgames.com
so you will have to route "chat.euw1.lol.riotgames.com" to localhost inside the host file.
Code:
127.0.0.1 chat.na1.lol.riotgames.com
127.0.0.1 chat.eu.lol.riotgames.com
127.0.0.1 chat.eun1.lol.riotgames.com
127.0.0.1 chat.euw1.lol.riotgames.com
Methode 2
To get a smaller sourcecode it is also possible to block/bind-before the ports which LoL(Xmpp-Client) is using. This will give ya the same effect. Here is a XMPP port list:
Code:
5222/TCP (Client-to-Server)
5269/TCP (Server-to-Server)
Legacy-SSL:
5223/TCP (SSL)
__________________________________________________ _____________
Sometimes it happens that the program or the program's working directory is blocked by the firewall itself just after setting admin permissions. In this case controlling this path: "C:\Windows\System32\drivers\etc\hosts". Then you'll have to grand access to this directory by setting permissions for the program while it is running inside your firewall itself.
Here is a really good tutorial how to do that:
This shoes up because the program's author didn't catch the exception inside the script. Spares time but lesser information for its' user.
For example reminding this by using try and catch with your working code:
Code:
try
{
FileStream file = new FileStream(System.Environment.SystemDirectory + @"\drivers\etc\hosts", FileMode.Append, FileAccess.Write, FileShare.ReadWrite);
foreach (string line in lines)
{
byte[] message = Encoding.ASCII.GetBytes("\n" + line + "\n");
file.Write(message, 0, message.Length);
}
file.Close();
CloseRemotePort(5223);
}
catch (Exception ex)
{
debugConsole(ex.Message);
debugConsole("Unable to open file, is it open by any other program?");
}
debugConsole("Succesfully patched");
debugConsole("Press deactivate to redo patching");
Quiet easy or ?
So no, its not bannable because it is just firewall or routing related local on your own machine.
Greetings