Register
Login 




New Topic Post Reply  [ 13 posts ]  Go to page
 Previous << 
1, 2
  Print view
Previous topic | Next topic 
Author Message
Offline 
 Post subject: Re: CTBan
PostPosted: Mon Jul 02, 2018 9:03 am 
User avatar
Staff
Legend
Steam ID: STEAM_0:1:43792252
Joined: Wed Nov 11, 2015 4:07 pm
Posts: 2713
Central wrote:
Doldol wrote:
Central wrote:
A bit of an issue, may just need a server restart or a map change, but people who are CT Banned are able to join CT somehow.


They are slain and swapped though right?

Of course :P once they go to CT with an existing CT ban and I catch em, I slay and swap, and comes to a server ban when they swap back after that. But just letting you know. It might just need a server restart I'm not sure, this has happened before, several times and was fixed until now.


I think I've heard people saying they use auto-assign or something to join CT and get around our CT ban. Could be doing it normally, haven't been able to confirm it.
-No Pity For A Coward-
http://cdn.funnyisms.com/ecc914b3-1ce2-4aa7-8b36-992cf563121f.jpg
"im srry, i din mean it massta, lil simple is gone be a good boy massta" -Mr. Simplistic
"Your taste in music is A2+ and I like how you moto." -Needy

Image


Top
 Profile  
 Social 
Offline 
 Post subject: Re: CTBan
PostPosted: Mon Jul 02, 2018 11:06 am 
User avatar
Staff
Legend
Steam ID: STEAM_0:1:177980773
Joined: Fri Jul 08, 2016 4:44 am
Posts: 2643
Yiggles Moto wrote:
Central wrote:
Doldol wrote:
Central wrote:
A bit of an issue, may just need a server restart or a map change, but people who are CT Banned are able to join CT somehow.


They are slain and swapped though right?

Of course :P once they go to CT with an existing CT ban and I catch em, I slay and swap, and comes to a server ban when they swap back after that. But just letting you know. It might just need a server restart I'm not sure, this has happened before, several times and was fixed until now.


I think I've heard people saying they use auto-assign or something to join CT and get around our CT ban. Could be doing it normally, haven't been able to confirm it.

That’s been a think for absolutely centuries, seen it done before, it occasionally works I don’t think it does as it used to anymore but I’m not sure if a map change had fixed, hadn’t been on since I reported that ione stopped working however I haven’t seen that done for a while or heard of it being done for quite a long time. I was a member back when that happened though so over a year now. But I’ll say something if I hear of it again
Image

*DEAD* EgN|s BEST ADMIN TITTYSPRINKLES: i thought today was rulebreaking day my bad :-(
*DEAD* EgN| Terminator #Fishy Guy: yup, ma dick to long :)


Top
 Profile  
  
Offline 
 Post subject: Re: CTBan
PostPosted: Mon Jul 02, 2018 12:55 pm 
User avatar
Community Leader
Legend
Steam ID: STEAM_0:1:84775876
Joined: Fri Jul 29, 2011 4:52 pm
Posts: 6449
Location: l: 179° 56′ 39.4″, b: +0° 2′ 46.2″, d: 7,940 ± 420 parsecs, from Via Lactea galactic center.
Central wrote:
Doldol wrote:
Central wrote:
A bit of an issue, may just need a server restart or a map change, but people who are CT Banned are able to join CT somehow.


They are slain and swapped though right?

Of course :P once they go to CT with an existing CT ban and I catch em, I slay and swap, and comes to a server ban when they swap back after that. But just letting you know. It might just need a server restart I'm not sure, this has happened before, several times and was fixed until now.

I meant automatically.

Again, this plugin wasn't written by me, I was just asked to fix bans not working, and so I did. It's in large parts wasted effort and not really worth my time fixing since it's not really great code. I'm just applying duct tape to a car falling apart.

I've seen people claim they wanted to help code or at least knew how to, I'll post the code if you guys would help, it'd be pretty welcome. If not I guess I'll go over it in a couple days (please don't make me :/).

The code: https://pastebin.com/d4Dvr4qD

teambalancer plugin calls bans.isbanned to check if the player is banned when trying to join ct
Relevant code:
Syntax - python: Download - Hide
try:
        from ctbans import ctbans as ctban
except Exception:
        from warnings import warn
        warn("Could not import ctbans", ImportWarning)



def jointeam_callback(command, index):
        try:
                chosen_team = int(command[1])
        except (IndexError, ValueError):
                chosen_team = 0
                #return CommandReturn.BLOCK
        if chosen_team == 3:
                try:
                        if ctban.bans.isbanned(player.steamid):
                                SayText2(message="\x05EgN Balancer| \x01You are CTBanned!").send(index)
                                return CommandReturn.BLOCK
                except Exception:
                        pass
                t_count = get_team_player_count(2)
                ct_count = get_team_player_count(3)
                max_ct = max(1, t_count//2)
                if ct_count < max_ct:
                        assigned_team = 3
                else:
                        SayText2(message=CANT_JOIN_TEAM_MSG.format(TEAM_NAMES[chosen_team])).send(index)
                        return CommandReturn.BLOCK
        elif chosen_team == 0:
                try:
                        is_ctbanned = ctban.bans.isbanned(player.steamid)
                except Exception:
                        is_ctbanned = False
                if is_ctbanned:
                        assigned_team = 2
                else:
                        t_count = get_team_player_count(2)
                        ct_count = get_team_player_count(3)
                        max_ct = t_count//2
                        if ct_count < max_ct:
                                assigned_team = random.choice((2,3))
                        else:
                                assigned_team = 2
        elif chosen_team in (1,2):
                assigned_team = chosen_team
        else:
                return CommandReturn.BLOCK
#               raise NotImplementedError("Team {0} is not implemented in the Teambalancer!".format(chosen_team))
        swap_to_team(Player(index), assigned_team)
        return CommandReturn.BLOCK


The admin plugin:
https://pastebin.com/ci4gUBmF
Been there, done that. No regrets, never give up on what's important. Prioritize. Happiness is all that matters.
I really like meowers but can't own any for the time being. Image

Software Developer with a fondness for Python & UE4.
🐱‍👤
Image

ImageImageImage
Interested in Star Citizen? - Use STAR-PZ6J-4C62 and get us both some cool extras :3


Top
 Profile  
  
Display posts from previous:  Sort by  
New Topic Post Reply  [ 13 posts ]  Go to page
 Previous << 
1, 2


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum
Jump to:  

cron
Powered by phpBB3 ©
Website mods by Doldol, banner by 3n19ma, synthic, Mootiny.