Raised This Month: $ Target: $400
 0% 

Ultimate Chat + Addons


Post New Thread Reply   
 
Thread Tools Display Modes
Black Rose
Veteran Member
Join Date: Feb 2011
Location: Upplands Väsby, Sweden
Old 05-18-2014 , 12:24   Re: Ultimate Chat + Addons
Reply With Quote #21

The file is in regular expression. normal words can be used of course as they are also expressions. Just very static ones.
Regex enables you to make it more dynamic. I suggest watching these tutorials on YouTube from Derek Banas:
https://www.youtube.com/playlist?lis...4F2FDD28D0C40E

\d+\D+\d+\D+\d+\D+\d+(?:\D+\d+)?
This will catch any number of digits followed by any number of non digits, repeated 3 times without the non-digits at the end and optional port after that.
It is very vague but there's no good way around it. The problem is that it will also catch for example:
"Hello, I got 25 kills, 10 deaths. That will make a k:d ratio of 2.5. Amaze"
But who writes 4 numbers in once sentence? I don't think that's very common.
__________________

Last edited by Black Rose; 05-18-2014 at 12:26.
Black Rose is offline
AMeEeRo
BANNED
Join Date: Dec 2013
Location: Who care ?
Old 05-18-2014 , 13:10   Re: Ultimate Chat + Addons
Reply With Quote #22

Quote:
Originally Posted by Black Rose View Post
The file is in regular expression. normal words can be used of course as they are also expressions. Just very static ones.
Regex enables you to make it more dynamic. I suggest watching these tutorials on YouTube from Derek Banas:
https://www.youtube.com/playlist?lis...4F2FDD28D0C40E

\d+\D+\d+\D+\d+\D+\d+(?:\D+\d+)?
This will catch any number of digits followed by any number of non digits, repeated 3 times without the non-digits at the end and optional port after that.
It is very vague but there's no good way around it. The problem is that it will also catch for example:
"Hello, I got 25 kills, 10 deaths. That will make a k:d ratio of 2.5. Amaze"
But who writes 4 numbers in once sentence? I don't think that's very common.
Thanks but i know nothing about it, and you are right 4 numbers.....
So i add this line just like that ?
PHP Code:
\d+\D+\d+\D+\d+\D+\d+(?:\D+\d+) 
This will block ip ?
How about bad words i have some problems cuz of fk can you learn me simple way ?
i'm suing line like
PHP Code:
fk you
fk u 
To block fk..
Without videos just small examples please and thanks
And i want to ask you how to block, say /rs
I just want to block some commands from being on chat like say /rs say /rank but i don't one to hide words cuz i'm using ad_manger, they use say /ip to spam ip ( on other chat plugins ), I mean i just want to block registered commands like rs rank.. i tried to put the plugins under restscore.amxx and up, same :\
Please help great job again
AMeEeRo is offline
Black Rose
Veteran Member
Join Date: Feb 2011
Location: Upplands Väsby, Sweden
Old 05-18-2014 , 17:52   Re: Ultimate Chat + Addons
Reply With Quote #23

Quote:
Originally Posted by AMeEeRo View Post
Thanks but i know nothing about it, and you are right 4 numbers.....
So i add this line just like that ?
PHP Code:
\d+\D+\d+\D+\d+\D+\d+(?:\D+\d+) 
This will block ip ?
Yes. It will block 4-5 numbers with anything but numbers in between. IP addresses included.
Quote:
Originally Posted by AMeEeRo View Post
How about bad words i have some problems cuz of fk can you learn me simple way ?
i'm suing line like
PHP Code:
fk you
fk u 
To block fk..
Without videos just small examples please and thanks
And i want to ask you how to block, say /rs
I just want to block some commands from being on chat like say /rs say /rank but i don't one to hide words cuz i'm using ad_manger, they use say /ip to spam ip ( on other chat plugins ), I mean i just want to block registered commands like rs rank.. i tried to put the plugins under restscore.amxx and up, same :\
Please help great job again
"fk u" and "fk you" should work. Not sure what you want really...
Did not understand the part about /rs, /rank and /ip.
__________________

Last edited by Black Rose; 05-18-2014 at 18:03.
Black Rose is offline
AMeEeRo
BANNED
Join Date: Dec 2013
Location: Who care ?
Old 05-19-2014 , 03:42   Re: Ultimate Chat + Addons
Reply With Quote #24

Quote:
Originally Posted by Black Rose View Post
Yes. It will block 4-5 numbers with anything but numbers in between. IP addresses included.


"fk u" and "fk you" should work. Not sure what you want really...
Did not understand the part about /rs, /rank and /ip.
Okey thanks, about /rs /rank
Some chat plugins block them, i mean when you right /anything no one see it, but in your plugin we can see, i don't want to see them i just want to block /rs and /rank i mean registered commands not anything after /
AMeEeRo is offline
AMeEeRo
BANNED
Join Date: Dec 2013
Location: Who care ?
Old 05-22-2014 , 03:39   Re: Ultimate Chat + Addons
Reply With Quote #25

2 More, when admins say /top15 the server prints op15 with team color, can you remove /t /g /y /n ?
Also, can you check admins chat ? Or add admins chat with your plugin, it should be really ultimate, admins chat is cool, but after we mute a player, he use admin chat to insult, so please make when player muted can't use admins chat and also make admins chat filtered by swear filter..
Thanks.

Last edited by AMeEeRo; 05-22-2014 at 03:43.
AMeEeRo is offline
Black Rose
Veteran Member
Join Date: Feb 2011
Location: Upplands Väsby, Sweden
Old 05-23-2014 , 17:42   Re: Ultimate Chat + Addons
Reply With Quote #26

Quote:
Originally Posted by AMeEeRo View Post
Okey thanks, about /rs /rank
Some chat plugins block them, i mean when you right /anything no one see it, but in your plugin we can see, i don't want to see them i just want to block /rs and /rank i mean registered commands not anything after /
This has been fixed in version 1.4 of the UC base plugin using this code:

Code:
public plugin_init() {         //...         set_task(1.0, "PlaceUCLastInQue"); } public PlaceUCLastInQue() {     register_clcmd("say", "HandleSay");     register_clcmd("say_team", "HandleSay"); }
This will make sure that UC is the last plugin to receive the command, so if any other plugin blocks the message, it will never get picked up by UC.

It's all about where you place this plugin in the plugins.ini because that determines in which order everything is called, but the code above eliminates that problem.

...unless I'm not understanding you correctly.

Quote:
Originally Posted by AMeEeRo View Post
2 More, when admins say /top15 the server prints op15 with team color, can you remove /t /g /y /n ?
I will definitely fix that tomorrow.

Quote:
Originally Posted by AMeEeRo View Post
Also, can you check admins chat ? Or add admins chat with your plugin, it should be really ultimate, admins chat is cool, but after we mute a player, he use admin chat to insult, so please make when player muted can't use admins chat and also make admins chat filtered by swear filter..
Thanks.
I will take a look at it. No promises.
__________________
Black Rose is offline
AMeEeRo
BANNED
Join Date: Dec 2013
Location: Who care ?
Old 05-24-2014 , 09:56   Re: Ultimate Chat + Addons
Reply With Quote #27

Quote:
Originally Posted by Black Rose View Post
This has been fixed in version 1.4 of the UC base plugin using this code:

Code:
public plugin_init() {         //...         set_task(1.0, "PlaceUCLastInQue"); } public PlaceUCLastInQue() {     register_clcmd("say", "HandleSay");     register_clcmd("say_team", "HandleSay"); }
This will make sure that UC is the last plugin to receive the command, so if any other plugin blocks the message, it will never get picked up by UC.

It's all about where you place this plugin in the plugins.ini because that determines in which order everything is called, but the code above eliminates that problem.

...unless I'm not understanding you correctly.



I will definitely fix that tomorrow.



I will take a look at it. No promises.
Thanks a lot but didn't understand, if i want to block /rs /rank where to put the plugin on plugins.ini ? above or under them ?
BTW, i tried two but same..
AMeEeRo is offline
Black Rose
Veteran Member
Join Date: Feb 2011
Location: Upplands Väsby, Sweden
Old 05-24-2014 , 10:47   Re: Ultimate Chat + Addons
Reply With Quote #28

I thought that some other plugin was supposed to block them.
If not, you can use this:

Code:
#include <amxmodx> #include <cstrike> new gCommands[][] = {     "/rs",     "/rank" } public plugin_init() {         register_plugin("Block", "1.0", "[ --{[email protected] ]");         set_task(0.8, "PlaceAlmostLastInQue"); } public PlaceAlmostLastInQue() {     register_clcmd("say", "HandleSay");     register_clcmd("say_team", "HandleSay"); } public HandleSay(id) {         if ( ! is_user_connected(id) )         return PLUGIN_CONTINUE;         static Text[192];     read_args(Text, charsmax(Text));     remove_quotes(Text);     trim(Text);         if ( ! Text[0] )         return PLUGIN_HANDLED;         for ( new i ; i < sizeof gCommands ; i++ ) {         if ( equali(Text, gCommands[i], strlen(gCommands[i])) )             return PLUGIN_HANDLED;     }         return PLUGIN_CONTINUE; }
__________________

Last edited by Black Rose; 05-24-2014 at 10:47.
Black Rose is offline
AMeEeRo
BANNED
Join Date: Dec 2013
Location: Who care ?
Old 05-24-2014 , 11:18   Re: Ultimate Chat + Addons
Reply With Quote #29

Quote:
Originally Posted by Black Rose View Post
I thought that some other plugin was supposed to block them.
If not, you can use this:

Code:
#include <amxmodx> #include <cstrike> new gCommands[][] = {     "/rs",     "/rank" } public plugin_init() {         register_plugin("Block", "1.0", "[ --{[email protected] ]");         set_task(0.8, "PlaceAlmostLastInQue"); } public PlaceAlmostLastInQue() {     register_clcmd("say", "HandleSay");     register_clcmd("say_team", "HandleSay"); } public HandleSay(id) {         if ( ! is_user_connected(id) )         return PLUGIN_CONTINUE;         static Text[192];     read_args(Text, charsmax(Text));     remove_quotes(Text);     trim(Text);         if ( ! Text[0] )         return PLUGIN_HANDLED;         for ( new i ; i < sizeof gCommands ; i++ ) {         if ( equali(Text, gCommands[i], strlen(gCommands[i])) )             return PLUGIN_HANDLED;     }         return PLUGIN_CONTINUE; }
This new plugins to block some commands ?
That's what what i want
You can make add it on first post ultimate_chat_block.sma it will be cool for most..
Thanks a lot.
EDIT: where to place this plugin, above or under ultimate chat ?

Last edited by AMeEeRo; 05-24-2014 at 11:28.
AMeEeRo is offline
Black Rose
Veteran Member
Join Date: Feb 2011
Location: Upplands Väsby, Sweden
Old 05-25-2014 , 05:11   Re: Ultimate Chat + Addons
Reply With Quote #30

Quote:
Originally Posted by AMeEeRo View Post
This new plugins to block some commands ?
That's what what i want
You can make add it on first post ultimate_chat_block.sma it will be cool for most..
Thanks a lot.
EDIT: where to place this plugin, above or under ultimate chat ?
The plugin will place itself after everything but before UC. You can put it anywhere.
If I were to release that I should at least make it read from a file.
__________________

Last edited by Black Rose; 05-25-2014 at 05:17.
Black Rose is offline
Reply


Thread Tools
Display Modes

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:07.


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