Raised This Month: $51 Target: $400
 12% 

SayBind Blocker


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   General Purpose       
WorldGod
BANNED
Join Date: Aug 2016
Location: Top of the World
Old 11-10-2016 , 06:13   SayBind Blocker
Reply With Quote #1

// Deleted, new plugin here:

https://forums.alliedmods.net/showthread.php?t=294832

Last edited by WorldGod; 03-10-2017 at 02:00.
WorldGod is offline
Send a message via Yahoo to WorldGod
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 11-10-2016 , 09:27   Re: SayBind Blocker
Reply With Quote #2

You cannot post the .amxx file. You can only post the .sma file. If you don't have the .sma file then you cannot post the plugin here.
__________________
fysiks is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 11-11-2016 , 10:07   Re: SayBind Blocker
Reply With Quote #3

AMXX file removed.

Quote:
Originally Posted by fysiks View Post
You cannot post the .amxx file. You can only post the .sma file. If you don't have the .sma file then you cannot post the plugin here.
+
Please post the source code in 24 hours.
__________________

Last edited by HamletEagle; 11-11-2016 at 10:08.
HamletEagle is offline
siriusmd99
Veteran Member
Join Date: Oct 2013
Location: Republic of Moldova
Old 11-12-2016 , 11:28   Re: SayBind Blocker
Reply With Quote #4

And what's the sense of this plugin?
Let's say this plugin with a wonderful way hooks messagemode and blocks say commands sent by using bind.
This can be used to block spam messages from fake players.

But you must know that there are useful binds like /resetscore or /stats and others.
It will block these binds too.

Sure, you can make a whitelist and add these ones as exceptions but it's annoying.
siriusmd99 is offline
WorldGod
BANNED
Join Date: Aug 2016
Location: Top of the World
Old 11-12-2016 , 12:02   Re: SayBind Blocker
Reply With Quote #5

There is a white list

Buy some glasses and read again the topic ;)

Last edited by WorldGod; 11-12-2016 at 12:02.
WorldGod is offline
Send a message via Yahoo to WorldGod
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 11-13-2016 , 01:56   Re: SayBind Blocker
Reply With Quote #6

It is not possible to know if a command is being sent from a bind, btw.
__________________
fysiks is offline
siriusmd99
Veteran Member
Join Date: Oct 2013
Location: Republic of Moldova
Old 11-13-2016 , 03:10   Re: SayBind Blocker
Reply With Quote #7

Quote:
Originally Posted by fysiks View Post
It is not possible to know if a command is being sent from a bind, btw.
Sure, it's just a typical romanian backdoored stuff.

Last edited by siriusmd99; 11-13-2016 at 03:10.
siriusmd99 is offline
georgik57
Veteran Member
Join Date: Oct 2008
Location: 🎧Music World
Old 03-05-2017 , 04:17   Re: SayBind Blocker
Reply With Quote #8

Quote:
Originally Posted by fysiks View Post
It is not possible to know if a command is being sent from a bind, btw.
Credits to HamletEagle.
Code:
#include <amxmodx> public plugin_init() {    register_clcmd("say", "ClientCommand_Say")    register_clcmd("say_team", "ClientCommand_Say") } public ClientCommand_Say(id) {    new ChatLine[192]    read_args(ChatLine, charsmax(ChatLine))        if(ChatLine[0] != '^"')    {       client_print(id, print_chat, "Binds are not permitted")       return PLUGIN_HANDLED    }        return PLUGIN_CONTINUE }
__________________
georgik57 is offline
Send a message via MSN to georgik57 Send a message via Yahoo to georgik57 Send a message via Skype™ to georgik57
kristi
Senior Member
Join Date: Nov 2016
Old 03-05-2017 , 07:07   Re: SayBind Blocker
Reply With Quote #9

Quote:
Originally Posted by Mistrick View Post
Decompiled...
PHP Code:
#include <amxmodx>

#pragma semicolon 1
#pragma ctrlchar '\'

new nr;
new 
cuv[100][256];
new 
wargods[2];

public 
plugin_init()
{
    
register_plugin("WarGods SayBind Blocker""1.21""Tiger");
    
register_clcmd("say""handleSay", -1"", -1);
    
register_clcmd("say_team""handleSay", -1"", -1);
    return 
0;
}

public 
plugin_precache()
{
    
wargods[0] = register_cvar("wgods_saybind_blocker""1"00.00);
    
wargods[1] = register_cvar("wgods_saybind_debug""1"00.00);
    if (
get_pcvar_num(wargods[0]))
    {
        new 
szDatadir[64];
        new 
g_szFile[128];
        
get_localinfo("amxx_configsdir"szDatadir63);
        
formatex(szDatadir63"%s"szDatadir);
        if (!
dir_exists(szDatadir))
        {
            
mkdir(szDatadir);
        }
        
formatex(g_szFile127"%s/wargods_saybind_expcetion.ini"szDatadir);
        if (!
file_exists(g_szFile))
        {
            return 
1;
        }
        new 
Data[256];
        new 
cuvant[32];
        new 
iFile fopen(g_szFile"rt");
        while (!
feof(iFile))
        {
            if (
nr == 99)
            {
                return 
1;
            }
            
fgets(iFileData255);
            
parse(Datacuvant31);
            
format(cuv[nr], 255"%s"cuvant);
            
nr += 1;
        }
        
fclose(iFile);
        return 
0;
    }
    return 
1;
}

public 
handleSay(id)
{
    if (
get_pcvar_num(wargods[0]))
    {
        new 
args[50];
        
read_args(args49);
        if (
args[0] != 34)
        {
            if (
nr)
            {
                new 
0;
                while (
<= nr)
                {
                    if (
equal(argscuv[i]))
                    {
                        return 
0;
                    }
                    
i++;
                }
            }
            new 
name[32];
            
get_user_name(idname31);
            
// message_begin(MSG_ONE, 76, _, id);
            // write_byte(id);
            // write_string(103516);
            // message_end();
            
if (get_pcvar_num(wargods[1]) == 1)
            {
                
log_to_file("WarGods SayBind Blocker.log""Nick: %s [Say: %s]"nameargs);
            }
            return 
1;
        }
        return 
0;
    }
    return 
0;

kristi is offline
Send a message via Skype™ to kristi
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 03-05-2017 , 15:35   Re: SayBind Blocker
Reply With Quote #10

Quote:
Originally Posted by georgik57 View Post
Credits to HamletEagle.
Code:
#include <amxmodx> public plugin_init() {    register_clcmd("say", "ClientCommand_Say")    register_clcmd("say_team", "ClientCommand_Say") } public ClientCommand_Say(id) {    new ChatLine[192]    read_args(ChatLine, charsmax(ChatLine))        if(ChatLine[0] != '^"')    {       client_print(id, print_chat, "Binds are not permitted")       return PLUGIN_HANDLED    }        return PLUGIN_CONTINUE }
So far I've found that this method is prone to false positives.
__________________

Last edited by fysiks; 03-05-2017 at 15:36.
fysiks 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 11:48.


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