<commit_before>﻿
namespace SteamMobile.Commands
{
    public class Unban : Command
    {
        public override string Type { get { return "unban"; } }

        public override string Format(CommandTarget target, string type) { return "]"; }

        public override void Handle(CommandTarget target, string type, string[] parameters)
        {
            if (!target.IsRoom || !Util.IsMod(target) || parameters.Length == 0)
                return;

            if (!Util.IsValidUsername(parameters[0]))
            {
                target.Send("Invalid username.");
                return;
            }

            var forAccount = Account.Get(parameters[0]);

            if (forAccount == null)
            {
                target.Send("Account does not exist.");
                return;
            }

            if (Util.IsAdmin(target.Room, forAccount.Name))
            {
                target.Send("Administrators can not be banned.");
                return;
            }

            if (target.Room.IsBanned(forAccount.Name))
            {
                target.Send("Account is not banned.");
                return;
            }

            target.Room.Unban(parameters[0]);

            var line = new StateLine
            {<commit_msg>Fix copypaste error<commit_after>﻿
namespace SteamMobile.Commands
{
    public class Unban : Command
    {
        public override string Type { get { return "unban"; } }

        public override string Format(CommandTarget target, string type) { return "]"; }

        public override void Handle(CommandTarget target, string type, string[] parameters)
        {
            if (!target.IsRoom || !Util.IsMod(target) || parameters.Length == 0)
                return;

            if (!Util.IsValidUsername(parameters[0]))
            {
                target.Send("Invalid username.");
                return;
            }

            var forAccount = Account.Get(parameters[0]);

            if (forAccount == null)
            {
                target.Send("Account does not exist.");
                return;
            }

            if (Util.IsAdmin(target.Room, forAccount.Name))
            {
                target.Send("Administrators can not be banned.");
                return;
            }

            if (!target.Room.IsBanned(forAccount.Name))
            {
                target.Send("Account is not banned.");
                return;
            }

            target.Room.Unban(parameters[0]);

            var line = new StateLine
            {
{'fraction_non_alphanumeric': 0.10303987366758784, 'fraction_numerical': 0.0031583103039873666, 'mean_word_length': 1.43888354186718, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3802813', 'n_tokens_mistral': 631, 'n_tokens_neox': 591, 'n_words': 150}