In our support boards we aim to provide support for the B3 core in its current state. Older releases of B3 are NOT supported. Check our front page for the latest version. You may post feature requests in our General Discussion board. Modifications and Hacks of the core B3 code are NOT supported.
Before you ask for support: [ Read the Support Instructions ] - More info: [ Full Support Disclaimer ]

You are here: Big Brother Bot ForumSupport ForumsGeneral Usage Support (Moderator: MordyT)Spams in multiple languages
Pages: [1] 2   Go Down
  Print  
Author Topic: Spams in multiple languages  (Read 3132 times) Bookmark and Share
Jr. Member
**
Posts: 23
Offline Offline
« on: July 22, 2008, 08:06:04 AM »

Hi,

I wish to be able to spam our rules in multiple languages, setting up the spammages is not the issue, my problem is that b3 won't start with  the following characters....

ö
ß
ä
ü
etc etc

Any advise welcome !!!


Thanks in advance,
Spunga.
Logged

Former Dev. (senate)
*****
Posts: 350
Offline Offline
« Reply #1 on: July 22, 2008, 09:15:16 AM »

Can you list the error messages
Logged
Jr. Member
**
Posts: 23
Offline Offline
« Reply #2 on: July 22, 2008, 09:27:28 AM »

I stuck a German word, töten, into one of my spams to create this. Hopefully it says something to you because it means nothing to me.
Thanks for taking the time to try and help !!


080722 18:24:07   BOT       Starting Cod2Parser server for ******************
080722 18:24:07   BOT       --------------------------------------------
080722 18:24:07   BOT       Attempting to connect to database mysql://******:******@localhost/b3cod4...
080722 18:24:07   BOT       Connected to database
080722 18:24:07   BOT       Game log \Serverdoc\PARA_PubCOD4S1\COD4 Server\Mods\para_trm\Server_mp.log
080722 18:24:07   BOT       Starting bot reading file \Serverdoc\PARA_PubCOD4S1\COD4 Server\Mods\para_trm\Server_mp.log
080722 18:24:07   BOT       Loading Plugin #1 censor [C:\Python23\b3\conf\plugin_censor.xml]
080722 18:24:07   BOT       CensorPlugin: Loading config C:\Python23\b3\conf\plugin_censor.xml for CensorPlugin
080722 18:24:07   BOT       Plugin censor (2.0.2 - ThorN) loaded
080722 18:24:07   BOT       Loading Plugin #2 spamcontrol [C:\Python23\b3\conf\plugin_spamcontrol.xml]
080722 18:24:07   BOT       SpamcontrolPlugin: Loading config C:\Python23\b3\conf\plugin_spamcontrol.xml for SpamcontrolPlugin
080722 18:24:07   BOT       Plugin spamcontrol (1.1.1 - ThorN) loaded
080722 18:24:07   BOT       Loading Plugin #3 admin [C:\Python23\b3\conf\plugin_admin.xml]
080722 18:24:07   BOT       AdminPlugin: Loading config C:\Python23\b3\conf\plugin_admin.xml for AdminPlugin
080722 18:24:07   CRITICAL   Error loading plugin: not well-formed (invalid token): line 196, column 83
Traceback (most recent call last):
  File "C:\Python23\b3\parser.py", line 317, in loadPlugins
    self._plugins[p] = getattr(pluginModule, '%sPlugin' % p.title())(self, conf)
  File "C:\Python23\b3\plugin.py", line 42, in __init__
    self.loadConfig(config)
  File "C:\Python23\b3\plugin.py", line 74, in loadConfig
    self.config = b3.config.load(fileName)
  File "C:\Python23\b3\config.py", line 213, in load
    if config.load(fileName):
  File "C:\Python23\b3\config.py", line 146, in load
    self.readfp(f)
  File "C:\Python23\b3\config.py", line 45, in readfp
    self._xml = ElementTree.parse(fp)
  File "C:\Python23\lib\site-packages\elementtree\ElementTree.py", line 908, in parse
    tree = parser_api.parse(source)
  File "C:\Python23\lib\site-packages\elementtree\ElementTree.py", line 174, in parse
    parser.feed(data)
  File "C:\Python23\lib\site-packages\elementtree\ElementTree.py", line 1292, in feed
    self._parser.Parse(data, 0)
ExpatError: not well-formed (invalid token): line 196, column 83
Logged
Senior Dev.
*
OS: Linux
Type: Home user
Posts: 3485
Offline Offline
WWW
Support Specialty: B3-Core, UrT/SmG/BFBC2 parsers, Plugin development
« Reply #3 on: July 22, 2008, 10:02:53 AM »

In order to achieve this you have to use UTF8 encoding for the censor config file.

here is an example of the config file I used to test your situation :

Code:
<?xml version="1.0" encoding="UTF-8" ?>
<configuration plugin="censor">
<settings name="settings">
<set name="max_level">40</set>
</settings>
 
<badwords>
<penalty type="warning" reasonkeyword="cuss"/>
<badword name="test1" lang="pl">
<word>qßäüsdfö</word>
</badword>
</badwords>
 
<badnames>
<penalty type="warning" reasonkeyword="badname"/>
<badname name="test2">
<regexp>qßäüsdfö</regexp>
</badname>
</badnames>
</configuration>

Notice the 1st line. It is the called the xml declaration and it specifies in witch character set the file is encoded in.

The important thing is to be sure you use the UTF-8 character set when you save that file.

You need a good text editor for that. The one I used is notepad++. Go to the 'format' menu and choose 'Convert to UTF-8'

Logged

Jr. Member
**
Posts: 23
Offline Offline
« Reply #4 on: July 22, 2008, 11:12:28 AM »

Isn't this going to detect words with these characters in and flag it as a cuss ?
Logged
Senior Dev.
*
OS: Linux
Type: Home user
Posts: 3485
Offline Offline
WWW
Support Specialty: B3-Core, UrT/SmG/BFBC2 parsers, Plugin development
« Reply #5 on: July 22, 2008, 11:14:46 AM »

of course the example in my last post is not to be used as this. It's just a test with those characters
Logged

Jr. Member
**
Posts: 23
Offline Offline
« Reply #6 on: July 22, 2008, 03:09:27 PM »

Thank you !!! But,

I tried that and it does not work.

I know I am trying to have German ascents (I think they are called), but to keep it simple, this is an example line from my admin.xml in my spammages section to spam a single encoded character, the copyright sign, this is just to figure it out on 1 character and go on from there.


<set name="grule1">&#169;My Clan</set>


As you explained, I have tried both of these xml declarations
<?xml version="1.0" encoding="iso-8859-1"?>
and
<?xml version="1.0" encoding="UTF-8"?>

and I've also tried Notepad++ formatting in both 8859 & UTF-8 respectively.

I hope that makes some kind of sense.

Thanks again!

Logged
Jr. Member
**
Posts: 23
Offline Offline
« Reply #7 on: July 22, 2008, 03:13:04 PM »

Forgot to mention that having the xml declaration for the character set does mean that b3 starts, which is further than before. (thank you)

But now when I run !s grule1 , nothing appears on the screen.
It looks like it is doing it, just not presenting it on the screen.


I am crap at describing events, hopefully you get it.
Logged
Senior Dev.
*
OS: Linux
Type: Home user
Posts: 3485
Offline Offline
WWW
Support Specialty: B3-Core, UrT/SmG/BFBC2 parsers, Plugin development
« Reply #8 on: July 22, 2008, 10:23:53 PM »

ok, if you want to display thoses characters ingame in the chat box, make sure your game supports other character set than ASCII.
For example, with Urban Terror, you cannot use accentuated characters. maybe that's why. Which game are you using ?
Logged

Jr. Member
**
Posts: 23
Offline Offline
« Reply #9 on: August 09, 2008, 03:25:19 PM »

COD2 & COD4.
Logged
Sr. Member
****
Posts: 238
Offline Offline
« Reply #10 on: August 10, 2008, 12:29:44 AM »

courgette,

the character set you define is in the censor plugin I think spunga is talking bout spammages in the plugin_admin.xml.

Can you also define a chracter set there?
Logged

Senior Dev.
*
OS: Linux
Type: Home user
Posts: 3485
Offline Offline
WWW
Support Specialty: B3-Core, UrT/SmG/BFBC2 parsers, Plugin development
« Reply #11 on: August 10, 2008, 01:25:10 AM »

@fff: it should. As all config files are XML files. (here is a tutorial for xml syntax if you want to learn more about it)

@spunga: do the same for the plugin_admin.xml config file and give it a try.
Also, try to write accentuated characters in chat ingame to see if your games support them.
« Last Edit: August 10, 2008, 01:28:47 AM by Courgette » Logged

Jr. Member
**
Posts: 23
Offline Offline
« Reply #12 on: August 19, 2008, 08:32:04 AM »

I have tried so many times with plugin_admin.xml and so many ways, god knows how many hours, I just get it to work. MY BRAIN HURTS !!

If, in in-game chat, I can type ALT 0232 for example to give me a è ,this works. So the character set is supported in game, I just cannot get my spammages to work.


Any other thoughts?
Logged
Senior Dev.
*
OS: Linux
Type: Home user
Posts: 3485
Offline Offline
WWW
Support Specialty: B3-Core, UrT/SmG/BFBC2 parsers, Plugin development
« Reply #13 on: August 19, 2008, 10:14:23 AM »

When trying to display a spam message, do you have any errors in the bot log ?
Logged

Jr. Member
**
Posts: 23
Offline Offline
« Reply #14 on: August 21, 2008, 07:29:03 AM »

080821 16:26:58   ERROR   RCON: ERROR sending: 'ascii' codec can't decode byte 0xff in position 0: ordinal not in range(128)
Logged
Tags:
Pages: [1] 2   Go Up
  Print  
 
Jump to:  


Rate this page +1 at Google Search


SimplePortal 2.3.1 © 2008-2009, SimplePortal