Thread: Auto swear gag
View Single Post
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 02-16-2012 , 23:49   Re: Auto swear gag
Reply With Quote #32

Quote:
Originally Posted by Schpraaankiii View Post
I changed amx_show_activity to 1 and it works now. But it looks a little bit strange...

"PLAYER: Has gagged k0nan from speaking for 10 minutes! (say / say_team / voicecomm"

Should'nt it be like "k0nan has been gagged from speaking for 10 minutes! (say / say_team / voicecomm" insted.
It recognizes the server as an admin, but it looks like the server has the "user" flag.
Check your users.ini and see if "loopback" admin has "z" flag (if so, remove it).

Quote:
Originally Posted by Schpraaankiii View Post
EDIT
I have one more request...
I want a list of allowed words for when you are gagged. So if a player gets gaggad he shoud still be able to type words from this list whithout the "You are gagged..."- text to apear.
In this list there will be things like: /rank /xp /admin ... and so on.
Put the gag plugin underneath plugins (in the plugins.ini) that have those commands.

Quote:
Originally Posted by Ejziponken View Post
Hm, is there a limit in the filters? All filters after line 124 dont work.. :E
And if i delete that word, its still the same, so its not a bug in the filters..

Edit:
Something is verry wrong with the filters.

Code:
L 02/17/2012 - 04:35:39: [AMXX] Plugin ("swear_filter.amxx") is setting itself as failed.
L 02/17/2012 - 04:35:39: [AMXX] Plugin says: Error on creating the Regex pattern.
L 02/17/2012 - 04:35:39: [AMXX] Displaying debug trace (plugin "swear_filter.amxx")
L 02/17/2012 - 04:35:39: [AMXX] Run time error 1: forced exit 
L 02/17/2012 - 04:35:39: [AMXX]    [0] swear_filter.sma::LoadPattern (line 219)
L 02/17/2012 - 04:35:39: [AMXX]    [1] swear_filter.sma::plugin_init (line 39)

I cant use "regex" "*lol*"

* = fail
* = Matches the preceding element zero or more times. For example, ab*c matches "ac", "abc", "abbbc", etc.
Because "*lol*" is not a valid expression.
* = Matches the preceding element zero or more times. For example, ab*c matches "ac", "abc", "abbbc", etc.

Well, you have "*" at the start at the expression, with nothing preceding it, so the pattern fails.
If you are trying to allow any character for "*", you need to use ".*".

Anyway, you don't have to put that around the expression since it already checks if it is anywhere in the said text.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline