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

Stop advertising on sv


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Admin Commands       
3pR0
New Member
Join Date: Nov 2012
Old 11-17-2012 , 00:46   Stop advertising on sv
Reply With Quote #1

Hello, I would like a plugin anti advertisement on sv, more understandable plugin to stop messages from robots that enter the sv and advertise in chat (like connect www.svmeu.ro ... they give free admin etc.)

I found a plugin like that one but do not know where to get sma's how I want to modify it

This plugins works exactly as shown in picture :

Part 1: I try to advertise / say or / sayteam

[IMG]http://img716.**************/img716/7537/recwk.jpg[/IMG]

Part 2: When I block advertising ... www.sitetul.meu and instead tells me that advertising is prohibited on sv

[IMG]http://img208.**************/img208/4471/rec1qf.jpg[/IMG]

Sma's would look like this ... but not completely

HTML Code:
#include <amxmodx>
#include <amxmisc>
#include <regex>
new Regex:re, ret;


public plugin_init() {
   
   
   register_plugin("AntiReclama", "1.0", "");
   register_clcmd("say", "CheckMessage");
   register_clcmd("say_team", "CheckMessage");
   
   new err[32];
   re = regex_compile("(?:\w+\.[a-z]{2,4}\b|(?:\s*\d+\s*\.){3})", ret, err, 31, "i");
   if (re!=REGEX_OK) server_print("Error: %s (%d)", err, ret);
}

public CheckMessage(id) {
   if (id > 0 && id < 33 && !is_user_admin(id)) {
      new text[64];
      read_args(text,63);
      
      if (strlen(text) > 4) {
         new match = regex_match_c(text, re, ret);
      
         if (match > 0) {
            client_print(id, print_chat, "Publicitatea este interzisa pe acest server!");
            return PLUGIN_HANDLED;
         }
      }
   }
   return PLUGIN_CONTINUE;
}

public plugin_end() {
   regex_free(re);   
}
Missing the part where you write the words you want to block ... of the crash if you write words with space

Thank you ... and wait for your opinions .. or completing your
3pR0 is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 11-17-2012 , 02:31   Re: Stop advertising on sv
Reply With Quote #2

You don't "write words" for this plugin. This is what it looks for: "(?:\w+\.[a-z]{2,4}\b|(?:\s*\d+\s*\.){3})" It's regex.
__________________

Last edited by fysiks; 11-17-2012 at 02:31.
fysiks is offline
3pR0
New Member
Join Date: Nov 2012
Old 11-18-2012 , 00:18   Re: Stop advertising on sv
Reply With Quote #3

ok, but please Tell me what is missing or what is going right at him, I do not figure out what is wrong with him,
help me out if you're better than me
3pR0 is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 11-18-2012 , 00:22   Re: Stop advertising on sv
Reply With Quote #4

Are you asking for assistance or releasing a plugin?
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
3pR0
New Member
Join Date: Nov 2012
Old 11-18-2012 , 00:54   Re: Stop advertising on sv
Reply With Quote #5

Yes

Nobody helped me

close and delete this post

Last edited by 3pR0; 11-18-2012 at 00:59. Reason: close and delete this post
3pR0 is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 11-18-2012 , 01:12   Re: Stop advertising on sv
Reply With Quote #6

You didn't answer my question, which one is it?
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
3pR0
New Member
Join Date: Nov 2012
Old 11-18-2012 , 02:12   Re: Stop advertising on sv
Reply With Quote #7

Sorry I have not been paying attention to the question asked by you

if you can not change it .. Yes I would like releasing a plugin

Last edited by 3pR0; 11-18-2012 at 02:17.
3pR0 is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 11-18-2012 , 02:28   Re: Stop advertising on sv
Reply With Quote #8

Okay, it seems you don't know what you are doing. I'm going to trash this thread and leave the one in Requests there.
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou 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 18:03.


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