ItsMods

Full Version: [Half-Outdated]Ban fix
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hey,
This is just a quick fix for the ban bug people are experiencing
since i'm at the university i can't extensively test it but it seems to work
Simply insert it into the plugins folder and forget about is Tongue
Why half outdated, because the xuid dont end up in the permanen.ban file, but it still kicks if someone is in there

Code:
using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
using Addon;
namespace BanFunction
{
    public class BanFunction : CPlugin
    {
        public override void OnServerLoad()
        {
            ServerPrint("Ban fixer loaded");
        }
        public override string OnCheckBan(string xuid)
        {
            try
            {
                String line;
                StreamReader sr = new StreamReader("main\\permanent.ban");
                while ((line = sr.ReadLine()) != null)
                {
                    string[] split = line.Split(' ');
                    if (split[0].Equals(xuid))
                    {
                        sr.Close();
                        return "You have been banned from this server";
                    }
                }
            }
            catch (Exception e)
            {
                ServerPrint("An error has occured:" + e.Message);

            }
            return null;
        }
    }
}
Virus scan:
https://www.virustotal.com/file/f5a92950...328536584/

Mirror:
http://94.75.245.138/plugins/BanFunction.dll
Thanks will test later mate!
I'm jelly.

My PermBan for MW2 consisted of way more code.
(02-06-2012, 18:47)SuperNovaAO Wrote: [ -> ]I'm jelly.

My PermBan for MW2 consisted of way more code.

I can imagine, only thing this does is what the server for some reason doesn't do, which is, actually check if someone is banned..
or at least, people are actually kicked xD
@bonemind
WTF ban bug?
(02-08-2012, 18:35)Yurio Wrote: [ -> ]@bonemind
WTF ban bug?

Some servers for some reason apparantly didn't kick banned people
Hi bonemind

Ban fix not working - when use kick or ban just show text of ban and player in serevr
(02-08-2012, 20:04)amirdj Wrote: [ -> ]Hi bonemind

Ban fix not working - when use kick or ban just show text of ban and player in serevr

What?
This only works if someone already has been banned and does not get kicked...this doesnt do anything else...
Hi bonemind

Were do Banned or kicked players GUID get put once banned?
Never mind bonemind found it it is in MW3\Main folder thanks any how

With that fix, !rcon banclient or !rcon ban dont work. and of course, nothing fixed.

I got a great problem all !ban !banc !rcon ban !rconbanclient, dont work only kick players.
Pages: 1 2