Raised This Month: $ Target: $400
 0% 

spam pl


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
visar1
Member
Join Date: Nov 2009
Old 08-02-2010 , 09:26   spam pl
Reply With Quote #1

I need help in this plugin

Quote:
#include <amxmodx>
#include <amxmisc>

#define PLUGIN "NoSpam"
#define VERSION "1.0"
#define AUTHOR "GooGle"

stock const advertising_words[][] = {

"http",
"www",
}

new const reason[] = "NoSpam";

public plugin_init() {

register_plugin(PLUGIN, VERSION, AUTHOR);

register_clcmd("say", "hook_chat");
register_clcmd("say_team", "hook_chat");
}

public hook_chat(id)
{
new szArgs[512];
read_args(szArgs, 511);

new len;
len = strlen(szArgs);

new digits, periods;

new szName[32];
get_user_name(id, szName, 31);

for(new i = 0 ; i < sizeof (advertising_words) ; i++)
{
if(containi(szArgs, advertising_words[i]) != -1)
{
server_cmd("amx_kick ^"%s^" %s", szName, reason);

return 1;
}
}

for(new i; i < len; i++)
{
if(isdigit(szArgs[i]))
{
digits++
}
else if(szArgs[i] == '.' || szArgs[i] == ':')
{
periods++
}
}

if(digits > 3 && periods > 2)
{
server_cmd("amx_kick ^"%s^" %s", szName, reason);

return 1;
}
return 0;
}
how to include check and nick name spam example player with www.website.com name and plugin deteced and kick

and block mesage in chat example player "akter" say visit www.website.com this mesage www.website.com dont show in chat and kick player

sorry for my english ?

Last edited by visar1; 08-02-2010 at 09:29.
visar1 is offline
am_amx
Senior Member
Join Date: Jul 2010
Location: here
Old 08-02-2010 , 23:10   Re: spam pl
Reply With Quote #2

Quote:
Originally Posted by visar1 View Post

and block mesage in chat example player "akter" say visit www.website.com this mesage www.website.com dont show in chat and kick player

sorry for my english ?
if u want to disaply a custom" msg like no websites in say "
use this plugin
https://forums.alliedmods.net/showthread.php?t=10343

and add www. to swearwords.ini

or
if u want to kick spammers use spam filter
am_amx is offline
nikhilgupta345
Veteran Member
Join Date: Aug 2009
Location: Virginia
Old 08-03-2010 , 00:54   Re: spam pl
Reply With Quote #3

For name:
Code:
new name[32]
get_user_name(id, name, 31)
if(containi(name, "www") || containi(name, ".com") || containi(name, ".org") || containi(name, ".net"))
{
client_cmd(id, "name I will stop spamming")
server_cmd("amx_kick ^"%s^" %s", name, reason);
}
For text:
Code:
new text[256]
read_args(text, 255)
remove_quotes(text)
if(containi(text, ".com") || containi(text, ".net") || containi(text, ".org") || containi(text, "www"))
{
server_cmd("amx_kick ^"%s^" %s", name, reason);
}

Last edited by nikhilgupta345; 08-03-2010 at 00:59.
nikhilgupta345 is offline
Send a message via ICQ to nikhilgupta345 Send a message via Yahoo to nikhilgupta345
visar1
Member
Join Date: Nov 2009
Old 08-03-2010 , 04:10   Re: spam pl
Reply With Quote #4

Quote:
Originally Posted by nikhilgupta345 View Post
For name:
Code:
new name[32]
get_user_name(id, name, 31)
if(containi(name, "www") || containi(name, ".com") || containi(name, ".org") || containi(name, ".net"))
{
client_cmd(id, "name I will stop spamming")
server_cmd("amx_kick ^"%s^" %s", name, reason);
}
For text:
Code:
new text[256]
read_args(text, 255)
remove_quotes(text)
if(containi(text, ".com") || containi(text, ".net") || containi(text, ".org") || containi(text, "www"))
{
server_cmd("amx_kick ^"%s^" %s", name, reason);
}
not work I have :S
visar1 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:02.


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