Raised This Month: $32 Target: $400
 8% 

[Any] Language Checker (v1.1.4.1, 06.01.2013)


Post New Thread Reply   
 
Thread Tools Display Modes
Author
NoZomIBK
Member
Join Date: Dec 2012
Location: Münster, Germany
Plugin ID:
3417
Plugin Version:
1.1.4.1
Plugin Category:
General Purpose
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Checks Chatmessages for language against dictionary. warns and/or kick players, if they keep writing other languages
    Old 12-16-2012 , 08:18   [Any] Language Checker (v1.1.4.1, 06.01.2013)
    Reply With Quote #1

    I am annoyed by people, which are always writing in languages, although my serverrules say, german or at least english. So i have written this plugin to get rid of these guys.

    Features
    This Plugins checks the words written in chat. it counts written words and words found in the dictionary files and calculates a little bit. With the cvars you can define the rules, when a player should get a warning and/or when a player should be kicked, because he keeps talking in a language, which is not one of the allowed ones on the server.
    Because I like to understand my teammates.
    since 1.1.2 Updater is supported.

    Cvars:
    • sm_lc_languages - language files, separated by ";"
    • sm_lc_enabled - enables plugin
    • sm_lc_logging - enables debug logging
    • sm_lc_min_wordcount - minimal written words before warning or kicks come
    • sm_lc_max_wordcount - Maximal amount of words to calculate ratio
    • sm_lc_min_warnings - minimal warnings before kick
    • sm_lc_max_warnings - warnings to kick if sm_lc_kick is set to 2
    • sm_lc_kick - 0: just warn, 1: kick by ratio, 2: kick by max_warnings
    • sm_lc_kick_ratio - ratio of unrecognized words to kick (0.0-1.0)
    • sm_lc_warn_ratio - ratio of unrecognized words to warn (0.0-1.0)
    • sm_lc_use_index - Create an index
    • sm_lc_version - Version (public)

    Commands:
    • sm_init_dict - reinitialize dictionary files
    • sm_lc_reset_player <name> - resets statistic for player

    Dictionary Files:
    Dictionary Files are located in addons/sourcemod/gamedata
    the files are named lc_<lang>.txt
    so if you want the languages en_us and en_gb, you set you sm_lc_languages to "en_us;en_gb" and have the files lc_en_us.txt and lc_en_gb.txt
    be careful, on linux the files are casesensitive
    these Files have one word per line

    You can find Dictionary Files here. Just rename the .dic file to .txt. Important: You cannot use this .txt now. The first entry will not be read, because the first six bytes of the file are crap. Two possibilities:
    1. Copy the content and save into a new .txt
    2. Open the file with a Hexeditor and delete the bullshitbytes

    Indexed Dictionary Files:
    For the proper work of the indexed files, the files must be sorted.
    upper or lower does not matter.
    index will only be used for ascii characters. if a word in chat starts with a multibyte char, whole file will be searched.

    Installation:
    Extract zip file to addons/sourcemod/ or just normal install the plugin file and get your dictionary somewhere.

    Changelog:
    Quote:
    v0.1 16.12.2012
    Initial Release
    Quote:
    v1.0 17.12.2012
    • Fixing punctuation Bug
    • Command to reset player statistics
    • public Version cvar
    • dictionary indexing
    • code cleanup
    • fixed dictionary files in zip
    Quote:
    v1.1 18.12.2012
    • max warnings to kick
    Quote:
    v1.1.1 18.12.2012 - 5min later
    • fixed bug in version cvar
    • fixed bug building index on dict-init although useIndex is false
    • automated reindexing on changing sm_lc_languanges
    Quote:
    v1.1.2 22.12.2012
    • updater support
    • Better calculation of badword-ratio
    • Fixed Bug: empty-word counted
    Quote:
    v1.1.4 1.1.2013
    • Fixed Bug: Ratio set to best ratio on player connect
    • Some more stuff in lolz
    Quote:
    v1.1.4.1 6.1.2013
    • Fixed Bug: Crash on plugin startup
    Todo:
    • immune player
    Attached Files
    File Type: txt language_check.phrases.txt (484 Bytes, 313 views)
    File Type: sp Get Plugin or Get Source (language_check.sp - 288 views - 14.2 KB)
    File Type: smx language_check.smx (13.1 KB, 242 views)
    File Type: zip lc.zip (1.55 MB, 269 views)
    __________________

    Last edited by NoZomIBK; 01-11-2013 at 04:24. Reason: update
    NoZomIBK is offline
    Send a message via ICQ to NoZomIBK Send a message via Skype™ to NoZomIBK
    scorpadorp
    SourceMod Donor
    Join Date: May 2012
    Location: NC
    Old 01-01-2013 , 15:27   Re: [Any] Language Checker (v1.1.2, 22.12.2012)
    Reply With Quote #2

    Nice, but don't you think it would also be nice to translate it to the desired language?
    scorpadorp is offline
    Mr. Man
    Veteran Member
    Join Date: Mar 2011
    Location: Huh?
    Old 01-01-2013 , 15:32   Re: [Any] Language Checker (v1.1.2, 22.12.2012)
    Reply With Quote #3

    Quote:
    Originally Posted by scorpadorp View Post
    Nice, but don't you think it would also be nice to translate it to the desired language?
    I made a request like this a while ago: https://forums.alliedmods.net/showthread.php?t=200969
    Mr. Man is offline
    NoZomIBK
    Member
    Join Date: Dec 2012
    Location: Münster, Germany
    Old 01-01-2013 , 15:57   Re: [Any] Language Checker (v1.1.4, 1.1.2013)
    Reply With Quote #4

    yes, this could be nice, but the problem is, you have to pay to use the googleservices... if you try to translate via their translation page, you will be soon captcha blocked

    ok, i see, yahoo seems not to block... interessting, indeed
    __________________

    Last edited by NoZomIBK; 01-01-2013 at 16:00.
    NoZomIBK is offline
    Send a message via ICQ to NoZomIBK Send a message via Skype™ to NoZomIBK
    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 17:14.


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