Raised This Month: $32 Target: $400
 8% 

Solved [REQ] Ban on disconnect and works with SourceBans ($$)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
akzmeister
Junior Member
Join Date: May 2016
Location: Chile
Old 01-26-2019 , 21:22   [REQ] Ban on disconnect and works with SourceBans ($$)
Reply With Quote #1

Looking for a developer to make a plugin that bans the people who disconnects in middle of a PUG (splewis pug setup), and also saves the ban in SourceBans.

Contact:
Discord: akz#6617
Steam: https://steamcommunity.com/id/akazetaa

Last edited by akzmeister; 01-29-2019 at 20:29.
akzmeister is offline
CliptonHeist
Senior Member
Join Date: Feb 2016
Old 01-26-2019 , 23:42   Re: [REQ] Ban on disconnect and works with SourceBans ($$)
Reply With Quote #2

That'll be $1000 please.

PHP Code:
#include <sourcemod>
#include <pugsetup>
#include <sourcebanspp>

#pragma semicolon 1
#pragma newdecls required

ConVar g_hCVBanTime;
ConVar g_hCVBanReason;

bool g_bSourcebans false;
bool g_bPugSetup false;

public 
Plugin myinfo 
{
    
name "Disconnect Ban"
    
author "The Doggy"
    
description "Bans players who disconnect during a match"
    
version "1.0.0",
    
url "DistrictNine.Host"
};

public 
void OnPluginStart()
{
    
g_hCVBanTime CreateConVar("sm_disconnectban_time""0""Amount of time to ban a player who disconnects during a match");
    
g_hCVBanReason CreateConVar("sm_disconnectban_reason""Disconnected from match""Reason to tell user why they were banned.");
}

public 
void OnAllPluginsLoaded()
{
    if(
LibraryExists("sourcebans++"))
        
g_bSourcebans true;
    else
        
LogError("Sourcebans++ is not loaded, this plugin will not work without it.");

    if(
LibraryExists("pugsetup"))
        
g_bPugSetup true;
    else
        
LogError("PugSetup is not loaded, this plugin will not work without it.");
}

public 
void OnLibraryAdded(const char[] name)
{
    if(
StrEqual(name"sourcebans++"))
        
g_bSourcebans true;
    if(
StrEqual(name"pugsetup"))
        
g_bPugSetup true;
}

public 
void OnLibraryRemoved(const char[] name)
{
    if(
StrEqual(name"sourcebans++"))
    {
        
g_bSourcebans false;
        
LogError("Sourcebans++ has been unloaded, this plugin will not work without it.");
    }
    if(
StrEqual(name"pugsetup"))
    {
        
g_bPugSetup false;
        
LogError("PugSetup has been unloaded, this plugin will not work without it.");
    }
}

public 
void OnClientDisconnect(int Client)
{
    if(!
g_bSourcebans || !g_bPugSetup) return;

    if(
PugSetup_IsMatchLive() && PugSetup_PlayerAtStart(Client))
    {
        
char sReason[256];
        
g_hCVBanReason.GetString(sReasonsizeof(sReason));
        
SBPP_BanPlayer(0Clientg_hCVBanTime.IntValuesReason);
    }

CliptonHeist is offline
gildevanaraujo
Senior Member
Join Date: Oct 2018
Location: Brazil
Old 01-28-2019 , 11:40   Re: [REQ] Ban on disconnect and works with SourceBans ($$)
Reply With Quote #3

I wonder if you can leave immune mods and server admins, it is banishing everything! HAHAHAHAHA!
gildevanaraujo is offline
DarkDeviL
SourceMod Moderator
Join Date: Apr 2012
Old 01-28-2019 , 11:58   Re: [REQ] Ban on disconnect and works with SourceBans ($$)
Reply With Quote #4

Quote:
Originally Posted by gildevanaraujo View Post
I wonder if you can leave immune mods and server admins, it is banishing everything! HAHAHAHAHA!
PHP Code:
#include <sourcemod>
#include <pugsetup>
#include <sourcebanspp>

#pragma semicolon 1
#pragma newdecls required

ConVar g_hCVBanTime;
ConVar g_hCVBanReason;

bool g_bSourcebans false;
bool g_bPugSetup false;

public 
Plugin myinfo 
{
    
name "Disconnect Ban"
    
author "The Doggy"
    
description "Bans players who disconnect during a match"
    
version "1.0.0",
    
url "DistrictNine.Host"
};

public 
void OnPluginStart()
{
    
g_hCVBanTime CreateConVar("sm_disconnectban_time""0""Amount of time to ban a player who disconnects during a match");
    
g_hCVBanReason CreateConVar("sm_disconnectban_reason""Disconnected from match""Reason to tell user why they were banned.");
}

public 
void OnAllPluginsLoaded()
{
    if(
LibraryExists("sourcebans++"))
        
g_bSourcebans true;
    else
        
LogError("Sourcebans++ is not loaded, this plugin will not work without it.");

    if(
LibraryExists("pugsetup"))
        
g_bPugSetup true;
    else
        
LogError("PugSetup is not loaded, this plugin will not work without it.");
}

public 
void OnLibraryAdded(const char[] name)
{
    if(
StrEqual(name"sourcebans++"))
        
g_bSourcebans true;
    if(
StrEqual(name"pugsetup"))
        
g_bPugSetup true;
}

public 
void OnLibraryRemoved(const char[] name)
{
    if(
StrEqual(name"sourcebans++"))
    {
        
g_bSourcebans false;
        
LogError("Sourcebans++ has been unloaded, this plugin will not work without it.");
    }
    if(
StrEqual(name"pugsetup"))
    {
        
g_bPugSetup false;
        
LogError("PugSetup has been unloaded, this plugin will not work without it.");
    }
}

public 
void OnClientDisconnect(int Client)
{
    if(!
g_bSourcebans || !g_bPugSetup) return;

    if(!
CheckCommandAccess(Client"sm_disconnectban_immune"ADMFLAG_ROOT) && PugSetup_IsMatchLive() && PugSetup_PlayerAtStart(Client))
    {
        
char sReason[256];
        
g_hCVBanReason.GetString(sReasonsizeof(sReason));
        
SBPP_BanPlayer(0Clientg_hCVBanTime.IntValuesReason);
    }

Then your relevant admins (e.g. the admin groups), allowing them access to the "sm_disconnectban_immune" override, and they will not be punished.


Quote:
Originally Posted by CliptonHeist View Post
That'll be $1000 please.
I also expect a tiny administrative fee on top of that, due to the fact that you didn't mention to begin with, that your admins/mods were super gods that should be excluded (e.g. job wasn't specified properly).

That'll be $1500 here, please.
__________________
Mostly known as "DarkDeviL".

Dropbox FastDL: Public folder will no longer work after March 15, 2017!
For more info, see the [SRCDS Thread], or the [HLDS Thread].
DarkDeviL is offline
Lannister
Veteran Member
Join Date: Apr 2015
Old 01-28-2019 , 12:25   Re: [REQ] Ban on disconnect and works with SourceBans ($$)
Reply With Quote #5

Quote:
Originally Posted by arne1288 View Post
PHP Code:
#include <sourcemod>
#include <pugsetup>
#include <sourcebanspp>

#pragma semicolon 1
#pragma newdecls required

ConVar g_hCVBanTime;
ConVar g_hCVBanReason;

bool g_bSourcebans false;
bool g_bPugSetup false;

public 
Plugin myinfo 
{
    
name "Disconnect Ban"
    
author "The Doggy"
    
description "Bans players who disconnect during a match"
    
version "1.0.0",
    
url "DistrictNine.Host"
};

public 
void OnPluginStart()
{
    
g_hCVBanTime CreateConVar("sm_disconnectban_time""0""Amount of time to ban a player who disconnects during a match");
    
g_hCVBanReason CreateConVar("sm_disconnectban_reason""Disconnected from match""Reason to tell user why they were banned.");
}

public 
void OnAllPluginsLoaded()
{
    if(
LibraryExists("sourcebans++"))
        
g_bSourcebans true;
    else
        
LogError("Sourcebans++ is not loaded, this plugin will not work without it.");

    if(
LibraryExists("pugsetup"))
        
g_bPugSetup true;
    else
        
LogError("PugSetup is not loaded, this plugin will not work without it.");
}

public 
void OnLibraryAdded(const char[] name)
{
    if(
StrEqual(name"sourcebans++"))
        
g_bSourcebans true;
    if(
StrEqual(name"pugsetup"))
        
g_bPugSetup true;
}

public 
void OnLibraryRemoved(const char[] name)
{
    if(
StrEqual(name"sourcebans++"))
    {
        
g_bSourcebans false;
        
LogError("Sourcebans++ has been unloaded, this plugin will not work without it.");
    }
    if(
StrEqual(name"pugsetup"))
    {
        
g_bPugSetup false;
        
LogError("PugSetup has been unloaded, this plugin will not work without it.");
    }
}

public 
void OnClientDisconnect(int Client)
{
    if(!
g_bSourcebans || !g_bPugSetup) return;

    if(!
CheckCommandAccess(Client"sm_disconnectban_immune"ADMFLAG_ROOT) && PugSetup_IsMatchLive() && PugSetup_PlayerAtStart(Client))
    {
        
char sReason[256];
        
g_hCVBanReason.GetString(sReasonsizeof(sReason));
        
SBPP_BanPlayer(0Clientg_hCVBanTime.IntValuesReason);
    }

Then your relevant admins (e.g. the admin groups), allowing them access to the "sm_disconnectban_immune" override, and they will not be punished.




I also expect a tiny administrative fee on top of that, due to the fact that you didn't mention to begin with, that your admins/mods were super gods that should be excluded (e.g. job wasn't specified properly).

That'll be $1500 here, please.
Ah... yes.. everything is correct.

I expect a tiny administrative fee for checking that everything was properly made.

That'll be $3.000 and a beer. Thanks
Lannister is offline
gildevanaraujo
Senior Member
Join Date: Oct 2018
Location: Brazil
Old 01-28-2019 , 14:36   Re: [REQ] Ban on disconnect and works with SourceBans ($$)
Reply With Quote #6

This is correct?

PHP Code:
if(!CheckCommandAccess(Client"sm_disconnectban_immune"ADMFLAG_ROOT ADMFLAG_BAN) && PugSetup_IsMatchLive() && PugSetup_PlayerAtStart(Client)) 

I want the admin flag and flag ban to have immunity, right?

Last edited by gildevanaraujo; 01-28-2019 at 14:38.
gildevanaraujo is offline
DarkDeviL
SourceMod Moderator
Join Date: Apr 2012
Old 01-28-2019 , 14:55   Re: [REQ] Ban on disconnect and works with SourceBans ($$)
Reply With Quote #7

Quote:
Originally Posted by gildevanaraujo View Post
This is correct?

PHP Code:
if(!CheckCommandAccess(Client"sm_disconnectban_immune"ADMFLAG_ROOT ADMFLAG_BAN) && PugSetup_IsMatchLive() && PugSetup_PlayerAtStart(Client)) 

I want the admin flag and flag ban to have immunity, right?
I don't believe I haven't ever seen | used with CheckCommandAccess, but you can do mutltiple CheckCommandAccess, e.g.:

PHP Code:
if(!CheckCommandAccess(Client"sm_disconnectban_immune"ADMFLAG_ROOT) && !CheckCommandAccess(Client"sm_disconnectban_immune"ADMFLAG_BAN) && PugSetup_IsMatchLive() && PugSetup_PlayerAtStart(Client)) 
Although I strongly suggest you to work on overrides if you are not already doing that.

They don't only give you access to those ~21'ish flags that SourceMod comes with, but is literally a way you can create "custom flags" with.

As overrides can be any alphanumeric value, you have like millions of options with them rather than just 21 different options with the flags.
__________________
Mostly known as "DarkDeviL".

Dropbox FastDL: Public folder will no longer work after March 15, 2017!
For more info, see the [SRCDS Thread], or the [HLDS Thread].
DarkDeviL is offline
gildevanaraujo
Senior Member
Join Date: Oct 2018
Location: Brazil
Old 01-28-2019 , 16:04   Re: [REQ] Ban on disconnect and works with SourceBans ($$)
Reply With Quote #8

One question, how do I banish only temporarily? You're banishing just permanent.
gildevanaraujo is offline
eyal282
Veteran Member
Join Date: Aug 2011
Old 01-28-2019 , 16:07   Re: [REQ] Ban on disconnect and works with SourceBans ($$)
Reply With Quote #9

Quote:
Originally Posted by gildevanaraujo View Post
One question, how do I banish only temporarily? You're banishing just permanent.
Go to server.cfg and write this there:

sm_disconnectban_time 60

This will ban for 60 minutes. Setting it to 0 means a permanent ban. My PayPal is in my signature. Of course since I didn't code anything and just gave data over the existing code, I do not expect more than 200$ of course.
__________________
I am available to make plugins for pay.

Discord: Eyal282#1334
eyal282 is offline
raj kaul
Senior Member
Join Date: Mar 2018
Location: www.lotgaming.xyz
Old 01-29-2019 , 01:38   Re: [REQ] Ban on disconnect and works with SourceBans ($$)
Reply With Quote #10

Quote:
Originally Posted by arne1288 View Post
PHP Code:
#include <sourcemod>
#include <pugsetup>
#include <sourcebanspp>

#pragma semicolon 1
#pragma newdecls required

ConVar g_hCVBanTime;
ConVar g_hCVBanReason;

bool g_bSourcebans false;
bool g_bPugSetup false;

public 
Plugin myinfo 
{
    
name "Disconnect Ban"
    
author "The Doggy"
    
description "Bans players who disconnect during a match"
    
version "1.0.0",
    
url "DistrictNine.Host"
};

public 
void OnPluginStart()
{
    
g_hCVBanTime CreateConVar("sm_disconnectban_time""0""Amount of time to ban a player who disconnects during a match");
    
g_hCVBanReason CreateConVar("sm_disconnectban_reason""Disconnected from match""Reason to tell user why they were banned.");
}

public 
void OnAllPluginsLoaded()
{
    if(
LibraryExists("sourcebans++"))
        
g_bSourcebans true;
    else
        
LogError("Sourcebans++ is not loaded, this plugin will not work without it.");

    if(
LibraryExists("pugsetup"))
        
g_bPugSetup true;
    else
        
LogError("PugSetup is not loaded, this plugin will not work without it.");
}

public 
void OnLibraryAdded(const char[] name)
{
    if(
StrEqual(name"sourcebans++"))
        
g_bSourcebans true;
    if(
StrEqual(name"pugsetup"))
        
g_bPugSetup true;
}

public 
void OnLibraryRemoved(const char[] name)
{
    if(
StrEqual(name"sourcebans++"))
    {
        
g_bSourcebans false;
        
LogError("Sourcebans++ has been unloaded, this plugin will not work without it.");
    }
    if(
StrEqual(name"pugsetup"))
    {
        
g_bPugSetup false;
        
LogError("PugSetup has been unloaded, this plugin will not work without it.");
    }
}

public 
void OnClientDisconnect(int Client)
{
    if(!
g_bSourcebans || !g_bPugSetup) return;

    if(!
CheckCommandAccess(Client"sm_disconnectban_immune"ADMFLAG_ROOT) && PugSetup_IsMatchLive() && PugSetup_PlayerAtStart(Client))
    {
        
char sReason[256];
        
g_hCVBanReason.GetString(sReasonsizeof(sReason));
        
SBPP_BanPlayer(0Clientg_hCVBanTime.IntValuesReason);
    }

Then your relevant admins (e.g. the admin groups), allowing them access to the "sm_disconnectban_immune" override, and they will not be punished.

can you add ban after a delay time? like give them 5 mints to join tha match again after that ban.
__________________
raj kaul is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 20:24.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode