Badword interceptor

Post here your questions about Actionscript and Java server side extensions development.

Moderators: Lapo, Bax

Post Reply
thomers1
Posts: 125
Joined: 13 Aug 2008, 07:36
Contact:

Badword interceptor

Post by thomers1 »

hello,

is it possible to "intercept" chat messages (to log each message into a DB for example), and to know if the SFS-badword filter kicked in?

do i have to registerForEvents?
http://www.smartfoxserver.com/docs/docP ... rForEvents

best,
thomas
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Post by Lapo »

Yes, you can intercept those messages but no the word filter works transparently. If you want to implement your own solution you can simply switch the default bad-words filter off.
Lapo
--
gotoAndPlay()
...addicted to flash games
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Post by Lapo »

do i have to registerForEvents?
No, check the "pubMsg" and "privMsg" events from the InternalEventObject class. By default those events are not fired by the server.
You can activate them by calling the following methods on the Zone (at init time):

Code: Select all

zone.setPubMsgInternalEvent(true)
zone.setPrivMsgInternalEvent(true)
Lapo
--
gotoAndPlay()
...addicted to flash games
thomers1
Posts: 125
Joined: 13 Aug 2008, 07:36
Contact:

Post by thomers1 »

thanks lapo, got it, works perfectly.
Post Reply