Search found 10 matches

by BadUser
04 Aug 2011, 07:56
Forum: Server Side Extension Development
Topic: Logging. Trace isn't enogh
Replies: 6
Views: 11531

Yes, i thought about that, but i think may be i missed something. it's unsafe to use file operations by myself, so.
Anyway, there's no more option i guess, so thanks for clearing.
by BadUser
03 Aug 2011, 09:15
Forum: Server Side Extension Development
Topic: Logging. Trace isn't enogh
Replies: 6
Views: 11531

I've found writeFile. I think that's what i need.
but ExtensionHelper.instance().writeFile() doesn't exists. Should i import some libraries?
by BadUser
03 Aug 2011, 08:59
Forum: Server Side Extension Development
Topic: Logging. Trace isn't enogh
Replies: 6
Views: 11531

Thanks, but i don't see how to make my own log file.
That example will put my log messages to general log-file for server, what about my own? F. e. i've created an extension and i want to make log file just for it
by BadUser
02 Aug 2011, 09:09
Forum: Server Side Extension Development
Topic: Logging. Trace isn't enogh
Replies: 6
Views: 11531

Logging. Trace isn't enogh

Hello. I'm sure this question is descriped somewhere, but still.
I wan't to make my own logging. How can i do that? i know that creating a file and write it on your own isn't a solution. So, please explain how to make it work/
by BadUser
15 Jul 2011, 07:15
Forum: Server Side Extension Development
Topic: BadWords filter extension
Replies: 8
Views: 14611

I've found my bug.

http://www.smartfoxserver.com/docs/docPages/serverSideApi/_server/dispatchPrivateMessage.htm

from that link i thought that for private messages i should write

User sender = sender = (User) ieo.getObject("user");

but actually it must be

User sender = sender = (User) ieo ...
by BadUser
15 Jul 2011, 06:28
Forum: Server Side Extension Development
Topic: BadWords filter extension
Replies: 8
Views: 14611

Got you.
Thanks for quick replies, you helped a lot in this question.
My filter works fine... Except private messages, throws an exception NullPointer Exception, when i call despatchPrivateMessage. Any ideas? All variables (msg, room, sender, recipient) aren't null, has been checked.
With public ...
by BadUser
13 Jul 2011, 06:43
Forum: Server Side Extension Development
Topic: BadWords filter extension
Replies: 8
Views: 14611

Thanks for making it clear. Very helpful.
But i'm wondering, why smartfox doesn't allow to make server more flexible in this way? Badword filter isn't perfect and there is no chance to write something by myselft, is it?
I don't think that loading my extension in every zone is the right way.
by BadUser
12 Jul 2011, 07:19
Forum: Server Side Extension Development
Topic: BadWords filter extension
Replies: 8
Views: 14611

Thanks!

Ok, if i consider that the current message contains some bad words, should i warn the user by myself somehow?
Config.xml gives the amuont of allowed swearing, so


if (isBas(message))
// Do what? Warn, ban, kick? or it's none of my business?
else
helper.dispatchPublicMessage(message, room ...
by BadUser
11 Jul 2011, 11:26
Forum: Server Side Extension Development
Topic: BadWords filter extension
Replies: 8
Views: 14611

Yeah

So.
I've figured out how to write an extensions in Java (via AbstractExtension).
Now i need to serarch for badwords in internaleventobject every message, and if i've found something forbidden - dispatch it? Then what? Explain please, it'll safe much time
by BadUser
11 Jul 2011, 08:49
Forum: Server Side Extension Development
Topic: BadWords filter extension
Replies: 8
Views: 14611

BadWords filter extension

Hello. May be this is a common topic, but i haven't found the answer for it, so, gonna ask here.

I'm going to create some extension - my own badword filer.
What steps should be done? I should disable integrated one somehow, right?
I need some help, being new to this. Thanks