Пример #1
0
 public static void CMDtcsay(CommandArgs args)
 {
     if (TCutils.AlreadyInClan(args.Player.UserAccountName))
     {
         //tcsay <msg>
         string msg = "";
         if (args.Parameters.Count > 0)
         {
             for (int i = 0; i < args.Parameters.Count; i++)
             {
                 msg = msg + " " + args.Parameters[i];
             }
             TCutils.ClanMsg(args.Player.UserAccountName, msg, 0, false);
         }
         else
         {
             args.Player.SendMessage("TerraClans.", Color.Red);
             args.Player.SendMessage("/tcsay <message>; /c <message> - sends message to your clan chat.", Color.Red);
         }
     }
     else
     {
         args.Player.SendMessage("You are not in clan!", Color.Red);
     }
 }
Пример #2
0
        public static void TCQuit(CommandArgs incArgs)
        {
            if (!incArgs.Player.IsLoggedIn)
            {
                incArgs.Player.SendMessage("You are not not logged in!", Color.Red);
                return;
            }
            if (!TCutils.AlreadyInClan(incArgs.Player.UserAccountName))
            {
                incArgs.Player.SendMessage("You are not in clan!", Color.Red);
                return;
            }
            if (TCutils.IsLeader(incArgs.Player.UserAccountName))
            {
                incArgs.Player.SendMessage("Leaders can't leave the clan!", Color.Red);
                return;
            }
            List <string> clName     = TCutils.GetClanByMember(incArgs.Player.UserAccountName);
            List <string> clMembers  = new List <string>();
            string        rawMembers = "";
            var           DBQuery    = TCdb.DB.QueryReader("SELECT members FROM Clans WHERE clanname='" + clName[0] + "'");

            while (DBQuery.Read())
            {
                string[] arr = DBQuery.Get <string>("members").Split(',');
                foreach (string i in arr)
                {
                    clMembers.Add(i);
                }
            }
            for (int c = 0; c < clMembers.Count; c++)
            {
                if (incArgs.Player.UserAccountName == clMembers[c])
                {
                    clMembers.RemoveAt(c);
                    break;
                }
            }
            if (clMembers.Count > 0)
            {
                rawMembers = string.Join(",", clMembers.ToArray());
            }
            TCutils.ClanMsg(incArgs.Player.UserAccountName, incArgs.Player.Name + " has left the clan!", 1, true);
            TCdb.DB.QueryReader("UPDATE Clans SET members='" + rawMembers + "' WHERE clanname='" + clName[0] + "'");
            var user = new User();

            user.Name = incArgs.Player.UserAccountName;
            if (!incArgs.Player.Group.HasPermission("terraclans"))
            {
                TShock.Users.SetUserGroup(user, TShock.Config.DefaultRegistrationGroupName);
            }
            incArgs.Player.SendMessage("You have left the clan!", Color.Yellow);
        }
Пример #3
0
        public static void TCFoundRevoke(CommandArgs incArgs)
        {
            string clName      = "";
            string clFounder   = "";
            string clCoFounder = "";
            var    DBQuery     = TCdb.DB.QueryReader("SELECT * FROM FoundQueue WHERE founder='" + incArgs.Player.UserAccountName + "'");

            while (DBQuery.Read())
            {
                clName      = DBQuery.Get <string>("clanname");
                clFounder   = DBQuery.Get <string>("founder");
                clCoFounder = DBQuery.Get <string>("cofounder");
            }

            if (!incArgs.Player.IsLoggedIn)
            {
                incArgs.Player.SendMessage("You are not logged in!", Color.Red);
                return;
            }
            if (TCutils.AlreadyInClan(incArgs.Player.UserAccountName))
            {
                incArgs.Player.SendMessage("You are already in clan!", Color.Red);
                return;
            }
            List <string> strQueue = TCutils.InQueue(clName, TCutils.GetPlayersByName(incArgs.Player.Name)[0], TCutils.GetPlayersByName(incArgs.Player.Name)[0]);

            if (strQueue.Count == 0)
            {
                incArgs.Player.SendMessage("You didn't invite anyone!", Color.Red);
                return;
            }

            if (clName != "" && clFounder != "" && clCoFounder != "")
            {
                TCdb.DB.QueryReader("DELETE FROM FoundQueue WHERE founder='" + incArgs.Player.UserAccountName + "'");
                incArgs.Player.SendMessage("You have revoked invitation!", Color.Orange);
                if (TCutils.GetPlayersByUserName(clCoFounder).Count == 1)
                {
                    TCutils.GetPlayersByUserName(clCoFounder)[0].TSPlayer.SendMessage(incArgs.Player.Name + " has revoked invitation!", Color.Orange);
                    return;
                }
            }
            else
            {
                incArgs.Player.SendMessage("You didn't invite anyone!", Color.Red);
            }
        }
Пример #4
0
 public static void CMDtcfound(CommandArgs args)
 {
     if (!TCutils.AlreadyInClan(args.Player.UserAccountName))
     {
         if (args.Parameters.Count == 2)
         {
             //tcfound
             TCFound(args);
         }
         else if (args.Parameters.Count == 1)
         {
             if (args.Parameters[0] == "accept")
             {
                 //tcfound accept
                 TCFoundAccept(args);
             }
             else if (args.Parameters[0] == "decline")
             {
                 //tcfound decline
                 TCFoundDecline(args);
             }
             else if (args.Parameters[0] == "revoke")
             {
                 TCFoundRevoke(args);
             }
             else
             {
                 args.Player.SendMessage("TerraClans:", Color.Orange);
                 args.Player.SendMessage("/tcfound accept - accepts founder's invitation.", Color.Orange);
                 args.Player.SendMessage("/tcfound decline - declines founder's invitation.", Color.Orange);
                 args.Player.SendMessage("/tcfound \"Clan Name\" \"co-founder\" - invite co-founder to found new clan with specified name.", Color.Orange);
             }
         }
         else
         {
             args.Player.SendMessage("TerraClans:", Color.Orange);
             args.Player.SendMessage("/tcfound accept - accepts founder's invitation.", Color.Orange);
             args.Player.SendMessage("/tcfound decline - declines founder's invitation.", Color.Orange);
             args.Player.SendMessage("/tcfound \"Clan Name\" \"co-founder\" - invite co-founder to found new clan with specified name.", Color.Orange);
         }
     }
     else
     {
         args.Player.SendMessage("You are already in clan!", Color.Red);
     }
 }
Пример #5
0
        public static void TCAdd(CommandArgs incArgs)
        {
            bool error = false;

            var           DBQuery      = TCdb.DB.QueryReader("SELECT clangroup FROM Clans WHERE clangroup='" + incArgs.Parameters[3] + "'");
            List <string> existedGroup = new List <string>();

            while (DBQuery.Read())
            {
                existedGroup.Add(DBQuery.Get <string>("clangroup"));
            }

            DBQuery = TCdb.DB.QueryReader("SELECT clanname FROM Clans WHERE clanname='" + incArgs.Parameters[1] + "'");
            List <string> existedClan = new List <string>();

            while (DBQuery.Read())
            {
                existedClan.Add(DBQuery.Get <string>("clanname"));
            }

            List <Player> players = new List <Player>();

            players = TCutils.GetPlayersByName(incArgs.Parameters[2]);
            if (players.Count == 0)
            {
                incArgs.Player.SendMessage("Player " + incArgs.Parameters[2] + " doesn't exist!", Color.Red);
                error = true;
            }
            else
            {
                var leader = players[0].TSPlayer.IsLoggedIn;
                if (!leader)
                {
                    incArgs.Player.SendMessage("Player " + incArgs.Parameters[2] + " is not logged in!", Color.Red);
                    error = true;
                }
                else if (TCutils.AlreadyInClan(players[0].TSPlayer.UserAccountName))
                {
                    incArgs.Player.SendMessage("One of " + incArgs.Parameters[2] + "'s characters is alredy in clan!", Color.Red);
                    error = true;
                }
                List <string> invites = new List <string>();
                invites = TCutils.GetAllInvites();
                foreach (string pl in invites)
                {
                    if (pl == TCutils.GetPlayersByName(incArgs.Parameters[2])[0].TSPlayer.UserAccountName)
                    {
                        incArgs.Player.SendMessage(incArgs.Parameters[2] + " is already invited to another clan!", Color.Red);
                        error = true;
                    }
                }
            }

            var group = TShock.Groups.GroupExists(incArgs.Parameters[3]);

            if (existedGroup.Count > 0)
            {
                incArgs.Player.SendMessage("Group " + incArgs.Parameters[3] + " is already bound to another clan!", Color.Red);
                error = true;
            }
            if (existedClan.Count > 0)
            {
                incArgs.Player.SendMessage("Clan " + incArgs.Parameters[1] + " is already exist!", Color.Red);
                error = true;
            }
            List <string> strQueue = TCutils.InQueue(incArgs.Parameters[1], TCutils.GetPlayersByName(incArgs.Parameters[2])[0], TCutils.GetPlayersByName(incArgs.Parameters[2])[0]);

            if (strQueue.Count > 0)
            {
                incArgs.Player.SendMessage("Clan name is occupied or player is gonna found his own clan.", Color.Red);
                error = true;
            }

            if (!error)
            {
                if (!group)
                {
                    TShock.Groups.AddGroup(incArgs.Parameters[3], "default", "");
                    incArgs.Player.SendMessage("Creating new group: " + incArgs.Parameters[3], Color.LawnGreen);
                }
                else
                {
                    List <string> perms = new List <string>();
                    perms = TShock.Utils.GetGroup(incArgs.Parameters[3]).permissions;
                    //perms.Add("clanchat");
                    incArgs.Player.SendMessage("Binding clan to existing group: " + incArgs.Parameters[3], Color.LawnGreen);
                    TShock.Groups.AddPermissions(incArgs.Parameters[3], perms);
                }
                TCdb.DB.QueryReader("INSERT INTO Clans (clanname, clangroup, leaders, members, motd, invites) VALUES ('" + incArgs.Parameters[1] + "', '" + incArgs.Parameters[3] + "', '" + players[0].TSPlayer.UserAccountName + "', '', 'Welcome to " + incArgs.Parameters[1] + "!', '')");
                incArgs.Player.SendMessage("Added clan: " + incArgs.Parameters[1], Color.LawnGreen);
                var user = new User();
                user.Name = players[0].TSPlayer.UserAccountName;
                if (!players[0].TSPlayer.Group.HasPermission("terraclans"))
                {
                    TShock.Users.SetUserGroup(user, incArgs.Parameters[3]);
                }
                players[0].TSPlayer.SendMessage(incArgs.Player.Name + " created clan \"" + incArgs.Parameters[1] + "\" with you as leader!", Color.YellowGreen);
                players[0].TSPlayer.SendMessage("Please, relogin to apply new settings for your account.", Color.Orange);
            }
        }
Пример #6
0
        public static void TCFound(CommandArgs incArgs)
        {
            if (!incArgs.Player.IsLoggedIn)
            {
                incArgs.Player.SendMessage("You are not logged in!", Color.Red);
                return;
            }
            if (TCutils.AlreadyInClan(incArgs.Player.UserAccountName))
            {
                incArgs.Player.SendMessage("You are already in clan!", Color.Red);
                return;
            }
            if (incArgs.Player.Name == incArgs.Parameters[1])
            {
                incArgs.Player.SendMessage("You cannot invite yourself!", Color.Red);
                return;
            }
            List <Player> coFounder = new List <Player>();

            coFounder = TCutils.GetPlayersByName(incArgs.Parameters[1]);
            if (coFounder.Count == 0)
            {
                incArgs.Player.SendMessage("Player " + incArgs.Parameters[1] + " doesn't exist!", Color.Red);
                return;
            }
            if (!coFounder[0].TSPlayer.IsLoggedIn)
            {
                incArgs.Player.SendMessage("Player " + coFounder[0].TSPlayer.Name + " is not logged in!", Color.Red);
                return;
            }
            if (TCutils.AlreadyInClan(coFounder[0].TSPlayer.UserAccountName))
            {
                incArgs.Player.SendMessage("Player " + coFounder[0].TSPlayer.Name + " is already in clan!", Color.Red);
                return;
            }
            List <string> invites = new List <string>();

            invites = TCutils.GetAllInvites();
            foreach (string i in invites)
            {
                if (i == incArgs.Player.UserAccountName)
                {
                    incArgs.Player.SendMessage("You are invited to another clan! Decline the invitation first!", Color.Red);
                    incArgs.Player.SendMessage("Type /tclan decline", Color.Red);
                    return;
                }
                if (i == coFounder[0].TSPlayer.UserAccountName)
                {
                    incArgs.Player.SendMessage("Player " + coFounder[0].TSPlayer.Name + " is invited to another clan!", Color.Red);
                    return;
                }
            }
            List <string> strQueue = TCutils.InQueue(incArgs.Parameters[0], TCutils.GetPlayersByName(incArgs.Player.Name)[0], coFounder[0]);

            if (strQueue.Count > 0)
            {
                foreach (string i in strQueue)
                {
                    incArgs.Player.SendMessage(i, Color.Red);
                }
                return;
            }

            TCdb.DB.QueryReader("INSERT INTO FoundQueue (clanname, founder, cofounder) VALUES ('" + incArgs.Parameters[0] + "', '" + incArgs.Player.UserAccountName + "', '" + coFounder[0].TSPlayer.UserAccountName + "')");

            coFounder[0].TSPlayer.SendMessage(incArgs.Player.Name + " invites you to found new clan: " + incArgs.Parameters[0], Color.Orange);
            coFounder[0].TSPlayer.SendMessage("/tcfound accept - accepts the invitation. ", Color.Orange);
            coFounder[0].TSPlayer.SendMessage("/tcfound decline - declines the invitation. ", Color.Orange);
            incArgs.Player.SendMessage("You have invited " + coFounder[0].TSPlayer.Name + " to found new clan.", Color.Orange);
        }
Пример #7
0
        public static void TCFoundAccept(CommandArgs incArgs)
        {
            string clName      = "";
            string clFounder   = "";
            string clCoFounder = "";
            var    DBQuery     = TCdb.DB.QueryReader("SELECT * FROM FoundQueue WHERE cofounder='" + incArgs.Player.UserAccountName + "'");

            while (DBQuery.Read())
            {
                clName      = DBQuery.Get <string>("clanname");
                clFounder   = DBQuery.Get <string>("founder");
                clCoFounder = DBQuery.Get <string>("cofounder");
            }

            if (!incArgs.Player.IsLoggedIn)
            {
                incArgs.Player.SendMessage("You are not logged in!", Color.Red);
                return;
            }
            if (TCutils.AlreadyInClan(incArgs.Player.UserAccountName))
            {
                incArgs.Player.SendMessage("You are already in clan!", Color.Red);
                return;
            }
            List <string> strQueue = TCutils.InQueue(incArgs.Parameters[0], TCutils.GetPlayersByName(incArgs.Player.Name)[0], TCutils.GetPlayersByName(incArgs.Player.Name)[0]);

            if (strQueue.Count == 0)
            {
                incArgs.Player.SendMessage("You are not invited to any clan!", Color.Red);
                return;
            }
            if (TCutils.GetPlayersByUserName(clFounder).Count == 0)
            {
                incArgs.Player.SendMessage("Your inviter should be online!", Color.Red);
                return;
            }
            if (clName != "" && clFounder != "" && clCoFounder != "")
            {
                TCdb.DB.QueryReader("DELETE FROM FoundQueue WHERE cofounder='" + incArgs.Player.UserAccountName + "'");
                int    timestamp = TCutils.UnixTimestamp();
                string clGroup   = "clan" + timestamp.ToString();
                string clMotd    = "Welcome to " + clName + "!";
                TCdb.DB.QueryReader("INSERT INTO Clans (clanname, clangroup, leaders, members, motd, invites) VALUES ('" + clName + "', '" + clGroup + "', '" + clFounder + "," + incArgs.Player.UserAccountName + "', '', '" + clMotd + "', '')");
                incArgs.Player.SendMessage("Congratulations! You have founded clan: " + clName, Color.LawnGreen);
                incArgs.Player.SendMessage("Please, relogin to apply new settings for your account.", Color.Orange);
                TCutils.GetPlayersByUserName(clFounder)[0].TSPlayer.SendMessage("Congratulations! You have founded clan: " + clName, Color.LawnGreen);
                TCutils.GetPlayersByUserName(clFounder)[0].TSPlayer.SendMessage("Please, relogin to apply new settings for your account.", Color.Orange);
                TShock.Groups.AddGroup(clGroup, "default", "");
                var user = new User();
                user.Name = clFounder;
                if (!TCutils.GetPlayersByUserName(clFounder)[0].TSPlayer.Group.HasPermission("terraclans"))
                {
                    TShock.Users.SetUserGroup(user, clGroup);
                }
                var user2 = new User();
                user2.Name = incArgs.Player.UserAccountName;
                if (!incArgs.Player.Group.HasPermission("terraclans"))
                {
                    TShock.Users.SetUserGroup(user2, clGroup);
                }
            }
            else
            {
                incArgs.Player.SendMessage("You are not invited to any clan!", Color.Red);
            }
        }
Пример #8
0
        public static void TCInvite(CommandArgs incArgs)
        {
            List <Player> players = new List <Player>();

            players = TCutils.GetPlayersByName(incArgs.Parameters[1]);
            if (players.Count == 0)
            {
                incArgs.Player.SendMessage("Player " + incArgs.Parameters[1] + " doesn't exist!", Color.Red);
            }
            else if (players.Count > 1)
            {
                incArgs.Player.SendMessage("There are at least 2 players match to " + incArgs.Parameters[1] + "!", Color.Red);
            }
            else
            {
                var reciever = players[0].TSPlayer.IsLoggedIn;
                if (!reciever)
                {
                    incArgs.Player.SendMessage("Player " + players[0].TSPlayer.Name + " is not logged in!", Color.Red);
                }
                else if (TCutils.AlreadyInClan(players[0].TSPlayer.UserAccountName))
                {
                    incArgs.Player.SendMessage("One of " + players[0].TSPlayer.Name + "'s characters is alredy in clan!", Color.Red);
                }
                else
                {
                    var           DBQuery = TCdb.DB.QueryReader("SELECT clanname FROM Clans WHERE leaders LIKE '%" + incArgs.Player.UserAccountName + "%' OR members LIKE '%" + incArgs.Player.UserAccountName + "%'");
                    List <string> Clan    = new List <string>();
                    while (DBQuery.Read())
                    {
                        Clan.Add(DBQuery.Get <string>("clanname"));
                    }
                    string        clanName = Clan[0];
                    List <string> invites  = new List <string>();
                    List <string> strQueue = TCutils.InQueue(clanName, players[0], players[0]);
                    if (strQueue.Count > 0)
                    {
                        incArgs.Player.SendMessage(incArgs.Parameters[1] + "is gonna found his own clan!", Color.Red);
                        return;
                    }
                    invites = TCutils.GetAllInvites();
                    bool isInvited = false;
                    if (invites.Count > 0)
                    {
                        for (int i = 0; i < invites.Count; i++)
                        {
                            if (players[0].TSPlayer.UserAccountName == invites[i])
                            {
                                isInvited = true;
                            }
                        }
                    }
                    if (isInvited)
                    {
                        incArgs.Player.SendMessage("Player " + players[0].TSPlayer.Name + " is already invited to another clan!", Color.Red);
                    }
                    else
                    {
                        invites = TCutils.GetInvites(clanName);
                        invites.Add(players[0].TSPlayer.UserAccountName);
                        string str = string.Join(",", invites.ToArray());
                        TCdb.DB.QueryReader("UPDATE Clans SET invites='" + str + "' WHERE clanname='" + clanName + "'");
                        players[0].TSPlayer.SendMessage(incArgs.Player.Name + " invites you to join the clan: " + clanName, Color.Orange);
                        players[0].TSPlayer.SendMessage("/tclan accept - to join", Color.Orange);
                        players[0].TSPlayer.SendMessage("/tclan decline - to decline invitation.", Color.Orange);
                        incArgs.Player.SendMessage("You invited " + players[0].TSPlayer.Name + " to join your clan!", Color.Yellow);
                    }
                }
            }
        }
Пример #9
0
 public static void CMDtclan(CommandArgs args)
 {
     //tclan invite player
     if (args.Parameters.Count == 2)
     {
         if (args.Parameters[0] == "invite")
         {
             if (TCutils.AlreadyInClan(args.Player.UserAccountName))
             {
                 TCInvite(args);
             }
             else
             {
                 args.Player.SendMessage("You are not in clan!", Color.Red);
             }
         }
         else if (args.Parameters[0] == "kick")
         {
             //tclan kick player
             if (TCutils.AlreadyInClan(args.Player.UserAccountName))
             {
                 TCkick(args);
             }
             else
             {
                 args.Player.SendMessage("You are not in clan!", Color.Red);
             }
         }
     }
     else if (args.Parameters.Count == 1)
     {
         //tclan accept
         if (args.Parameters[0] == "accept" && !TCutils.AlreadyInClan(args.Player.UserAccountName))
         {
             TCAccept(args);
         }
         //tclan decline
         else if (args.Parameters[0] == "decline" && !TCutils.AlreadyInClan(args.Player.UserAccountName))
         {
             TCDecline(args);
         }
         //tclan leave/quit
         else if (args.Parameters[0] == "leave" || args.Parameters[0] == "quit")
         {
             TCQuit(args);
         }
         else
         {
             if (!TCutils.AlreadyInClan(args.Player.UserAccountName))
             {
                 args.Player.SendMessage("TerraClans:", Color.Red);
                 args.Player.SendMessage("/tclan accept/decline - accepts/declines invitation.", Color.Red);
             }
         }
     }
     else
     {
         if (TCutils.AlreadyInClan(args.Player.UserAccountName))
         {
             args.Player.SendMessage("TerraClans:", Color.Red);
             args.Player.SendMessage("/tcsay <message>; /c <message> - sends message to your clan chat", Color.Red);
             args.Player.SendMessage("/tclan invite <player> - invites player to your clan chat", Color.Red);
             if (TCutils.IsLeader(args.Player.UserAccountName))
             {
                 args.Player.SendMessage("/tclan kick <player> - kicks player from your clan.", Color.Red);
             }
             else
             {
                 args.Player.SendMessage("/tclan leave/quit - to leave the clan.", Color.Red);
             }
         }
         else
         {
             args.Player.SendMessage("/tclan accept/decline - accepts/declines invitation.", Color.Red);
         }
         if (args.Player.Group.HasPermission("manageclans"))
         {
             args.Player.SendMessage("/tcman add <clanname> <leader> <clangroup> - adds clan.", Color.Red);
         }
     }
 }
Пример #10
0
        public static void TCkick(CommandArgs incArgs)
        {
            if (!incArgs.Player.IsLoggedIn)
            {
                incArgs.Player.SendMessage("You are not not logged in!", Color.Red);
                return;
            }
            if (!TCutils.AlreadyInClan(incArgs.Player.UserAccountName))
            {
                incArgs.Player.SendMessage("You are not in clan!", Color.Red);
                return;
            }
            if (!TCutils.IsLeader(incArgs.Player.UserAccountName))
            {
                incArgs.Player.SendMessage("You are not a leader!", Color.Red);
                return;
            }
            List <Player> victims = TCutils.GetPlayersByName(incArgs.Parameters[1]);

            if (victims.Count == 0)
            {
                incArgs.Player.SendMessage("Player does not exist!", Color.Red);
                return;
            }
            if (incArgs.Player.UserAccountName == TCutils.GetPlayersByName(incArgs.Parameters[1])[0].TSPlayer.UserAccountName)
            {
                incArgs.Player.SendMessage("You can't kick yourself!", Color.Red);
                return;
            }
            if (!victims[0].TSPlayer.IsLoggedIn)
            {
                incArgs.Player.SendMessage("Player is not logged in!", Color.Red);
                return;
            }
            if (!TCutils.IsValidMember(victims[0].TSPlayer.UserAccountName, incArgs.Player.UserAccountName))
            {
                incArgs.Player.SendMessage("Player is not in your clan!", Color.Red);
                return;
            }
            if (TCutils.IsLeader(victims[0].TSPlayer.UserAccountName))
            {
                incArgs.Player.SendMessage("You can't kick another leader!", Color.Red);
                return;
            }
            List <string> clName     = TCutils.GetClanByLeader(incArgs.Player.UserAccountName);
            List <string> clMembers  = new List <string>();
            string        rawMembers = "";
            var           DBQuery    = TCdb.DB.QueryReader("SELECT members FROM Clans WHERE clanname='" + clName[0] + "'");

            while (DBQuery.Read())
            {
                string[] arr = DBQuery.Get <string>("members").Split(',');
                foreach (string i in arr)
                {
                    clMembers.Add(i);
                }
            }
            for (int c = 0; c < clMembers.Count; c++)
            {
                if (victims[0].TSPlayer.UserAccountName == clMembers[c])
                {
                    clMembers.RemoveAt(c);
                    break;
                }
            }
            if (clMembers.Count > 0)
            {
                rawMembers = string.Join(",", clMembers.ToArray());
            }
            TCdb.DB.QueryReader("UPDATE Clans SET members='" + rawMembers + "' WHERE clanname='" + clName[0] + "'");
            var user = new User();

            user.Name = victims[0].TSPlayer.UserAccountName;
            if (!victims[0].TSPlayer.Group.HasPermission("terraclans"))
            {
                TShock.Users.SetUserGroup(user, TShock.Config.DefaultRegistrationGroupName);
            }
            TCutils.ClanMsg(incArgs.Player.UserAccountName, victims[0].TSPlayer.Name + " has been kicked from the clan!", 1, false);
            victims[0].TSPlayer.SendMessage("You have been kicked from the clan!", Color.Yellow);
        }