Cuberite Forum
NoSwear - Printable Version

+- Cuberite Forum (https://forum.cuberite.org)
+-- Forum: Plugins (https://forum.cuberite.org/forum-1.html)
+--- Forum: Plugin Releases (https://forum.cuberite.org/forum-2.html)
+--- Thread: NoSwear (/thread-1143.html)

Pages: 1 2


NoSwear - NiLSPACE - 05-26-2013

NoSwear
is usefull for admins who don't want their server with people who are constantly swearing.

Permissions:
  • NoSwear.Bypass
    If a player has this permission then he can swear whatever he wants. >.<

Config
  • There are two types of config files. there is the Config.ini where the color of the warning message and the warning message is and the BadWords.txt that contains all the words you want to get blocked.

    Config.ini
    • WarningColor
      is the color of the warning message you get. Default is rose
    • Warning
      is the warning the player gets. Default is "Bad, you may not swear"

    BadWords.txt
    • This file contains all the words you don't want people to say. If you want to add a word simply open the file press enter and type your new "banned" word. The words are not case sensitive



RE: NoSwear - bearbin - 05-27-2013

Can you add regular expression swear matching?


RE: NoSwear - NiLSPACE - 05-29-2013

I have no idea. WhatÅ› a regular expression?


RE: NoSwear - xoft - 05-29-2013

"regular expressions", or "regexps", is a technical way of specifying strings to search for. You most likely know "*.*", "*.exe" which is used for filename matching on windows, regexps are somewhat similar.

I believe Lua has regexp support built in (string.search(), string.gsub()), so this shouldn't be too difficult to make.


RE: NoSwear - NiLSPACE - 05-29-2013

I used string.find() with this plugin.


RE: NoSwear - xoft - 05-29-2013

So it should already support regexps:
http://lua-users.org/wiki/StringLibraryTutorial (s:find() section)
http://lua-users.org/wiki/PatternsTutorial (regexp format)


RE: NoSwear - bearbin - 05-30-2013

Cool! It's great that Lua just supports that by default.


RE: NoSwear - Antonio - 01-29-2014

Please update this plugin it is really good one, I'm planning on making 24/7 production server Smile. I got the following:

[01:18:52] Initialized ProtLimit
[01:18:52] Initialized ChatLog v.3
[01:18:52] Initialised Core v.14
[01:18:52] Initialized Coiny v6
[01:18:52] Initialized Blockchat v2
[01:18:52] Initialized Chatter v.1
[01:18:52] cPluginManager.AddHook(): Deprecated format used, use cPluginManager.AddHook(HOOK_TYPE, CallbackFunction) instead. Fixing the call for you.
[01:18:52] Stack trace:
[01:18:52] [C](-1): AddHook
[01:18:52] Plugins/NoSwear/main.lua(8): (no name)
[01:18:52] Stack trace end
[01:18:52] LUA: error in function 'new'.
argument #2 is 'string'; '[no object]' expected.

[01:18:52] Stack trace:
[01:18:52] [C](-1): (no name)
[01:18:52] [C](-1): (no name)
[01:18:52] [C](-1): cIniFile
[01:18:52] Plugins/NoSwear/main.lua(10): (no name)
[01:18:52] Stack trace end
[01:18:52] Error in plugin NoSwear calling function Initialize()
[01:18:52] Error in plugin NoSwear: Cannot call the Initialize() function. Plugin is temporarily disabled.


RE: NoSwear - xoft - 01-29-2014

STR, this seems to be only a problem with the cIniFile that has moved the filename from constructor to Read(), should be easy to fix. I'm wondering, if such a plugin should be in the mc-server github repos...


RE: NoSwear - NiLSPACE - 01-29-2014

I'll fix it now. I'm perfectly fine with my plugins moving to the mc-server repos.

I've fixed and uploaded it.