Raised This Month: $ Target: $400
 0% 

Chat Filter v0.4 (2/27)


Post New Thread Reply   
 
Thread Tools Display Modes
doodle
New Member
Join Date: Jul 2009
Old 07-01-2009 , 18:24   Re: Chat Filter v0.4 (2/27)
Reply With Quote #161

Hi

I recently tried installing this on my gmod10 server and I'm having no luck with it at all, it's not even showing up in the sm plugins list, and when I try sm plugins load chatfilter it merely brings up the list of plugins already installed

Am I right in thinking that you only install chatfilter.smx, chatfilter.cfg and phrases.chatfilter.txt? If so I've done all that (I tried installing everything under the installation heading but that didn't work either...)

Code:
L 07/01/2009 - 22:39:23: [SM] Displaying call stack trace for plugin "nextmap.smx":
L 07/01/2009 - 22:39:23: [SM]   [0]  Line 129, nextmap.sp::FindAndSetNextMap()
L 07/01/2009 - 22:39:23: [SM]   [1]  Line 99, nextmap.sp::OnConfigsExecuted()
L 07/01/2009 - 23:00:43: SourceMod error session started
L 07/01/2009 - 23:00:43: Info (map "gm_construct") (file "errors_20090701.log")
L 07/01/2009 - 23:00:43: [SM] Fatal error encountered parsing translation file "chatfilter.phrases.txt"
L 07/01/2009 - 23:00:43: [SM] Error (line 0, column 0): Stream failed to open
That's from my error log...

I've since tried reinstalling it to no avail.

Help! D:

Thanks in advance
doodle is offline
Nail
BANNED
Join Date: May 2008
Location: PetrovЪ GradЪ
Old 07-26-2009 , 08:44   Регистр букв / Register
Reply With Quote #162

How to remove dependence on the register (A->a,B->b,C->c,...,А->а,Б->б,...)?
Как отключить зависимость от регистра букв? (A->a,B->b,C->c,...,А->а,Б->б,...)
Без этого, даже слово из 4-х букв умеет нереальное число комбинаций (включая пробелы)

Quote:
L 07/29/2009 - 04:22:20: [SM] Plugin encountered error 15: Array index is out of bounds
L 07/29/2009 - 04:22:20: [SM] Displaying call stack trace for plugin "chatfilter.smx":
L 07/29/2009 - 04:22:20: [SM] [0] Line 613, /home/groups/sourcemod/upload_tmp/phpWNDUDv.sp::CF_MatchKeyword()
L 07/29/2009 - 04:22:20: [SM] [1] Line 461, /home/groups/sourcemod/upload_tmp/phpWNDUDv.sp::CF_CheckChat()
L 07/29/2009 - 04:22:20: [SM] [2] Line 428, /home/groups/sourcemod/upload_tmp/phpWNDUDv.sp::CF_SayHandler()

Last edited by Nail; 07-28-2009 at 20:24.
Nail is offline
nightrider
SourceMod Donor
Join Date: Dec 2008
Old 09-09-2009 , 13:20   Re: Chat Filter v0.4 (2/27)
Reply With Quote #163

Is there a command to reload the chat filter,
with out restarting your server?

I assume in console
sm_chatfilter_enable 1
sm_chatfilter_enable 0

Thank you in advance.

Last edited by nightrider; 09-09-2009 at 13:25.
nightrider is offline
Shouldercannon
BANNED
Join Date: Sep 2009
Location: Russia, Penza
Old 09-10-2009 , 03:15   Re: Chat Filter v0.4 (2/27)
Reply With Quote #164

Whether support of Russian words is possible?
Shouldercannon is offline
Send a message via ICQ to Shouldercannon
KhyrOO
Senior Member
Join Date: May 2008
Location: Budapest, Hungary
Old 09-26-2009 , 09:15   Re: Chat Filter v0.4 (2/27)
Reply With Quote #165

Hi, i got this in my logs:

Quote:
L 09/26/2009 - 14:48:23: SourceMod error session started
L 09/26/2009 - 14:48:23: Info (map "cp_fastlane") (file "errors_20090926.log")
L 09/26/2009 - 14:48:23: [SM] Native "GetClientTeam" reported: Client 12 is not in game
L 09/26/2009 - 14:48:23: [SM] Displaying call stack trace for plugin "chatfilter.smx":
L 09/26/2009 - 14:48:23: [SM] [0] Line 572, /home/groups/sourcemod/upload_tmp/phpQLIXpx.sp::CF_PrintToChat()
L 09/26/2009 - 14:48:23: [SM] [1] Line 468, /home/groups/sourcemod/upload_tmp/phpQLIXpx.sp::CF_CheckChat()
L 09/26/2009 - 14:48:23: [SM] [2] Line 432, /home/groups/sourcemod/upload_tmp/phpQLIXpx.sp::CF_SayTeamHandler()
__________________


The ForCe will be WiTH U ALwaYs!
KhyrOO is offline
Send a message via MSN to KhyrOO
Great Biggie
Member
Join Date: Aug 2009
Old 02-22-2010 , 19:43   Re: Chat Filter v0.4 (2/27)
Reply With Quote #166

sourcemod 1.3.1
metamod 1.8.0v
TF2 on linux server

Getting these errors, didnt get them until i upgraded to new SM and MM

L 02/22/2010 - 18:54:18: [SM] Native "GetClientTeam" reported: Client 26 is not in game
L 02/22/2010 - 18:54:18: [SM] Displaying call stack trace for plugin "chatfilter.smx":
L 02/22/2010 - 18:54:18: [SM] [0] Line 572, /home/groups/alliedmodders/forums/files/3/7/8/0/7/37973.attach::CF_PrintToChat()
L 02/22/2010 - 18:54:18: [SM] [1] Line 468, /home/groups/alliedmodders/forums/files/3/7/8/0/7/37973.attach::CF_CheckChat()
L 02/22/2010 - 18:54:18: [SM] [2] Line 432, /home/groups/alliedmodders/forums/files/3/7/8/0/7/37973.attach::CF_SayTeamHandler()
Great Biggie is offline
Danfocus
BANNED
Join Date: Mar 2010
Old 03-23-2010 , 02:54   Re: Chat Filter v0.4 (2/27)
Reply With Quote #167

Quote:
Originally Posted by Nail View Post
How to remove dependence on the register (A->a,B->b,C->c,...,А->а,Б->б,...)?
Как отключить зависимость от регистра букв? (A->a,B->b,C->c,...,А->а,Б->б,...)
Без этого, даже слово из 4-х букв умеет нереальное число комбинаций (включая пробелы)
Quote:
Originally Posted by Shouldercannon View Post
Whether support of Russian words is possible?
Вот функция для приведения к нижнему регистру
Code:
StringToLower(const String:value[], String:lvalue[]) {
        new String:BCHAR[][] = {"А","Б","В","Г","Д","Е","Ё","Ж","З","И","Й","К","Л","М","Н","О","П","Р","С","Т","У","Ф","Х","Ц","Ч","Ш","Щ","Ь","Ы","Ъ","Э","Ю","Я"};
        new String:LCHAR[][] = {"а","б","в","г","д","е","ё","ж","з","и","й","к","л","м","н","о","п","р","с","т","у","ф","х","ц","ч","ш","щ","ь","ы","ъ","э","ю","я"};
        strcopy(lvalue,191,value);
        for (new i = 0; i < 33; i++) {
                ReplaceString(lvalue, 191, BCHAR[i], LCHAR[i], true);
        }
}
И функция проверки должна выглядить примерно так
Code:
CF_MatchKeyword(const String:value[], String:match[], &offset, keywordidx) {
        new String:lowvalue[191];
        StringToLower(value, lowvalue);
        for (new i = keywordidx; i < g_cfKeywordCt; ++i) {
                if ((offset = StrContains(lowvalue, g_cfKeywords[i], false)) != -1 ) {
                        strcopy(match, strlen(g_cfKeywords[i])+1, value[offset]);
                        match[offset+strlen(g_cfKeywords[i])+1] = '\0';
                        return i;
                }
        }
        return -1;
}

Last edited by Danfocus; 03-23-2010 at 22:45.
Danfocus is offline
Danfocus
BANNED
Join Date: Mar 2010
Old 03-25-2010 , 00:59   Re: Chat Filter v0.4 (2/27)
Reply With Quote #168

Quote:
Originally Posted by KhyrOO View Post
Hi, i got this in my logs:
To avoid this need to patch in func CF_PrintToChat

find:
Code:
                        if (client != 0) {
                                if (teamonly && GetClientTeam(j) == GetClientTeam(client)) {
                                        sendMessage = true;
                                }
change to:
Code:
                        if (client != 0) {
                                if (teamonly && IsClientInGame(j) && GetClientTeam(j) == GetClientTeam(client)) {
                                        sendMessage = true;
                                }
Danfocus is offline
HowToPlay
Junior Member
Join Date: Jun 2010
Old 08-26-2010 , 10:01   Re: Chat Filter v0.4 (2/27)
Reply With Quote #169

Quote:
Originally Posted by Danfocus View Post
Вот функция для приведения к нижнему регистру
Code:
StringToLower(const String:value[], String:lvalue[]) {
        new String:BCHAR[][] = {"А","Б","В","Г","Д","Е","Ё","Ж","З","И","Й","К","Л","М","Н","О","П","Р","С","Т","У","Ф","Х","Ц","Ч","Ш","Щ","Ь","Ы","Ъ","Э","Ю","Я"};
        new String:LCHAR[][] = {"а","б","в","г","д","е","ё","ж","з","и","й","к","л","м","н","о","п","р","с","т","у","ф","х","ц","ч","ш","щ","ь","ы","ъ","э","ю","я"};
        strcopy(lvalue,191,value);
        for (new i = 0; i < 33; i++) {
                ReplaceString(lvalue, 191, BCHAR[i], LCHAR[i], true);
        }
}
И функция проверки должна выглядить примерно так
Code:
CF_MatchKeyword(const String:value[], String:match[], &offset, keywordidx) {
        new String:lowvalue[191];
        StringToLower(value, lowvalue);
        for (new i = keywordidx; i < g_cfKeywordCt; ++i) {
                if ((offset = StrContains(lowvalue, g_cfKeywords[i], false)) != -1 ) {
                        strcopy(match, strlen(g_cfKeywords[i])+1, value[offset]);
                        match[offset+strlen(g_cfKeywords[i])+1] = '\0';
                        return i;
                }
        }
        return -1;
}
Если у кого получилось, скинте исходник всего плагина.
P.s. интересно почему для англ keywords срабатывает в любом случа (при маленьком и большом регистре), а для рус несрабатывает.
HowToPlay is offline
halbblah
Member
Join Date: Feb 2007
Location: Germany
Old 11-02-2010 , 06:41   Re: Chat Filter v0.4 (2/27)
Reply With Quote #170

would be better if this accepted wildcards, so this plugin can distuingish between chat commands or swear words. Like this:
"fu" is replaced, but "/fu" is allowed
halbblah 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 09:51.


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