problem|| BadWordsFilter

Need help with SmartFoxServer? You didn't find an answer in our documentation? Please, post your questions here!

Moderators: Lapo, Bax

ransaymour
Posts: 25
Joined: 20 Jun 2016, 18:30

problem|| BadWordsFilter

Postby ransaymour » 19 Jul 2022, 23:07

Hello smart Fox team,

SFSPRO_V :1.6.20
OS: linux ubuntu 20.04.



This error occurs when someone curses:

Code: Select all

jvm 1    | 02:00:27.816 - [ WARNING ] > User: ran (Censored) is being kicked. Reason: swearing.
jvm 1    | 02:00:27.816 - [ WARNING ] > Unexpected Exception: java.lang.NullPointerException
jvm 1    | java.lang.NullPointerException
jvm 1    |      at it.gotoandplay.smartfoxserver.SmartFoxServer.addBannedUser(SmartFoxServer.java:2741)
jvm 1    |      at it.gotoandplay.smartfoxserver.SmartFoxServer.addKickedUser(SmartFoxServer.java:2942)
jvm 1    |      at it.gotoandplay.smartfoxserver.controllers.SystemHandler.applyBadWordFilter(SystemHandler.java:3980)
jvm 1    |      at it.gotoandplay.smartfoxserver.controllers.SystemHandler.handlePublicMessage(SystemHandler.java:1365                                       )
jvm 1    |      at it.gotoandplay.smartfoxserver.controllers.SystemHandler.processEvent(SystemHandler.java:275)
jvm 1    |      at it.gotoandplay.smartfoxserver.controllers.SystemHandler.run(SystemHandler.java:168)
jvm 1    |      at java.lang.Thread.run(Unknown Source)
jvm 1    | 02:01:32.848 - [ FINER ] > Removed badwords kick for ip-adr: "Censored"


The censorship of the curses works, but the part of the disconnection and blocking does not. :shock:

This is my setting on the server:

Code: Select all

<BadWordsFilter active="true">
<FilterMode>filter</FilterMode>
<StripCharacters><![CDATA[,.;:_!$%&/#*-+]]></StripCharacters>
<Warnings>true</Warnings>
<FilterRoomNames>true</FilterRoomNames>
<FilterUserNames>true</FilterUserNames>
<WarningsBeforeKick>1</WarningsBeforeKick>
<WarningMessage><![CDATA[No swearing!)]]></WarningMessage>
<KickMessage><![CDATA[You've been warned! No Swearing! Now you're kicked]]></KickMessage>
<BanMessage><![CDATA[YOU_BEEN_KICKED]]></BanMessage>
<BanAfter timeSpan="1">1</BanAfter>
         <BadWordsList>
               <!-- And the list of curses starts here -->
         </BadWordsList>
               </BadWordsFilter>
     


The messages are managed through the internal event of the extension (pubMsg)
User avatar
Lapo
Site Admin
Posts: 22560
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: problem|| BadWordsFilter

Postby Lapo » 20 Jul 2022, 10:50

Hi,
is this something that can be reproduced at will? If so can you provide repro case?

Thanks
Lapo
--
gotoAndPlay()
...addicted to flash games
ransaymour
Posts: 25
Joined: 20 Jun 2016, 18:30

Re: problem|| BadWordsFilter

Postby ransaymour » 20 Jul 2022, 19:38

Hi, I did not understand the answer :?

What do you mean by something that can be reproduced ?
User avatar
Lapo
Site Admin
Posts: 22560
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: problem|| BadWordsFilter

Postby Lapo » 21 Jul 2022, 07:30

Is it a problem that happens every time or only occasionally?
Can you explain the steps that cause this issue?

Thanks
Lapo

--

gotoAndPlay()

...addicted to flash games
ransaymour
Posts: 25
Joined: 20 Jun 2016, 18:30

Re: problem|| BadWordsFilter

Postby ransaymour » 21 Jul 2022, 11:36

It happens every time a user tries to swear.
I am aware of the filtering and blockin/kicking system, and this is the first time I have encountered such an error.


The user logs in through the loginRequest event,When the user swears in the room the message sent by the user does not appear in the room, but the user does not get disconnected from the server as a warning, and even if the user continues to swear he is not blocked.
It looks like the code inside the system is broken and unable to disconnect the user or block him.



The messages are managed through the internal event of the extension (pubMsg) so I canceled the event to see if it was related to a problem.

Code: Select all

      var zone = _server.getCurrentZone()
      zone.setPubMsgInternalEvent(false)
         zone.setPrivMsgInternalEvent(false)
         


and again the same error appears in the console log :

Code: Select all

vm 1    | 14:30:15.197 - [ WARNING ] > User: ran (Some IP address) is being kicked. Reason: swearing.
jvm 1    | 14:30:15.199 - [ WARNING ] > Unexpected Exception: java.lang.NullPointerException
jvm 1    | java.lang.NullPointerException
jvm 1    |      at it.gotoandplay.smartfoxserver.SmartFoxServer.addBannedUser(SmartFoxServer.java:2741)
jvm 1    |      at it.gotoandplay.smartfoxserver.SmartFoxServer.addKickedUser(SmartFoxServer.java:2942)
jvm 1    |      at it.gotoandplay.smartfoxserver.controllers.SystemHandler.applyBadWordFilter(SystemHandler.java:3980)
jvm 1    |      at it.gotoandplay.smartfoxserver.controllers.SystemHandler.handlePublicMessage(SystemHandler.java:1365)
jvm 1    |      at it.gotoandplay.smartfoxserver.controllers.SystemHandler.processEvent(SystemHandler.java:275)
jvm 1    |      at it.gotoandplay.smartfoxserver.controllers.SystemHandler.run(SystemHandler.java:168)
jvm 1    |      at java.lang.Thread.run(Unknown Source)
jvm 1    | 14:30:18.001 - [ FINE ] > Buddy Lists Autosave done in 1ms.
jvm 1    | 14:31:06.507 - [ FINE ] > User [ shoko ] logged in
jvm 1    | 14:31:17.996 - [ FINE ] > Buddy Lists Autosave done in 0ms.
jvm 1    | 14:32:12.607 - [ FINER ] > Removed badwords kick for ip-adr: "Some IP address"
ransaymour
Posts: 25
Joined: 20 Jun 2016, 18:30

Re: problem|| BadWordsFilter

Postby ransaymour » 21 Jul 2022, 12:40

Ok, after reinstalling the SFS everything works as usual.
A little weird but as long as it does not repeat itself I'm fine.
User avatar
Lapo
Site Admin
Posts: 22560
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: problem|| BadWordsFilter

Postby Lapo » 22 Jul 2022, 07:29

Thanks for the update. Weird indeed.
Lapo

--

gotoAndPlay()

...addicted to flash games

Return to “SmartFoxServer 1.x Discussions and Help”

Who is online

Users browsing this forum: No registered users and 19 guests