Audit_Chat

User avatar
tagban
Posts: 352
Joined: Fri Dec 28, 2012 11:31 am
Location: Pennsylvania, USA

Audit_Chat

Post by tagban » Sat Oct 19, 2013 7:34 pm

I think it'd be a good idea to edit this a bit, and allow auditing set for specific types of chat, for instance, in config file
audit_shout = yes/no
audit_say = yes/no
audit_system = yes/no

Would be a good start.

That way if you wanted to say, display chat messages on a website via php, it would work fine. Obviously I'm worried about ballooning the db, so things like "Shout" and "Yell" would be the best since they aren't so chatty.. and things like tells/say could be turned off so as to avoid massive spam/pings/etc.

Does the audit_chat clear out every so often?

User avatar
whasf
Site Admin
Posts: 1312
Joined: Thu Jul 19, 2012 9:11 pm

Re: Audit_Chat

Post by whasf » Mon Oct 21, 2013 9:07 pm

Good idea, that should be easy to add.

no, it doesn't clear out, you'll have to do the housekeeping yourself for now.
-- Whasf

User avatar
tagban
Posts: 352
Joined: Fri Dec 28, 2012 11:31 am
Location: Pennsylvania, USA

Re: Audit_Chat

Post by tagban » Mon Oct 21, 2013 11:20 pm

I figured out when the php page is accessed, to have it check times/dates if I want, OR just number the newest entries, then have it delete all but the last 10 from SQL, that will make it nice. Live system in place:

bnet.cc/ffxi/chat.php

Granted, not pretty at all, I'm more trying to get all of the site's mechanics down first, then I'll move onto the fun stuff. :)

User avatar
whasf
Site Admin
Posts: 1312
Joined: Thu Jul 19, 2012 9:11 pm

Re: Audit_Chat

Post by whasf » Tue Oct 22, 2013 7:02 pm

You can also have the SQL server do the work for you, like returning the last 10 chat lines:

Code: Select all

select *  from audit_chat order by lineid desc limit 10
-- Whasf

User avatar
demolish
Developer
Posts: 262
Joined: Thu Jul 26, 2012 7:12 am

Re: Audit_Chat

Post by demolish » Wed Oct 23, 2013 9:27 am

Scroll down to end of map_darkstar.conf and change it so it looks like this

Code: Select all

#Audit[logging] settings
audit_chat: 0
audit_say: 0
audit_shout: 0
audit_tell: 0
audit_yell: 0
audit_linkshell: 0
audit_party: 0
You have to set audit_chat to 1 before auditing the other chats.

Once you've done that, apply the patch in this post and rebuild DSGameServer.exe.
Attachments
audit_chat.patch
(5.9 KiB) Downloaded 311 times
<Giblet[NewBrain]> kj with this first step would be fine on my shit
Click here for a guide on scripting missions.

User avatar
tagban
Posts: 352
Joined: Fri Dec 28, 2012 11:31 am
Location: Pennsylvania, USA

Re: Audit_Chat

Post by tagban » Wed Oct 23, 2013 10:08 am

Cool thanks! This should totally be committed. It'd be awesome, and with the source I posted (under Custom Apps), anyone could basically create a chat page to begin with, obviously needs quite a bit of prettiness... But for what its worth, could be nice. I will make it organized shortly. :)

User avatar
demolish
Developer
Posts: 262
Joined: Thu Jul 26, 2012 7:12 am

Re: Audit_Chat

Post by demolish » Wed Oct 23, 2013 10:43 am

Haha good luck with that! :)
<Giblet[NewBrain]> kj with this first step would be fine on my shit
Click here for a guide on scripting missions.

User avatar
tagban
Posts: 352
Joined: Fri Dec 28, 2012 11:31 am
Location: Pennsylvania, USA

Re: Audit_Chat

Post by tagban » Wed Oct 23, 2013 11:13 am

Xx_DeMoLiSH wrote:Haha good luck with that! :)
Lol its just a matter of putting the time in on a day off. I could probably do it today, but promised a friend I'd get on and actually play some games today. But will definately edit it a bit later.

Whasf, part of my thought process is to actually clear out the older ones so the SQL Database doesn't balloon up too large, but I guess even a few thousand lines of chat wouldn't really be that bad right?

User avatar
whasf
Site Admin
Posts: 1312
Joined: Thu Jul 19, 2012 9:11 pm

Re: Audit_Chat

Post by whasf » Wed Oct 23, 2013 11:58 am

tagban wrote:
Xx_DeMoLiSH wrote:Haha good luck with that! :)
Lol its just a matter of putting the time in on a day off. I could probably do it today, but promised a friend I'd get on and actually play some games today. But will definately edit it a bit later.

Whasf, part of my thought process is to actually clear out the older ones so the SQL Database doesn't balloon up too large, but I guess even a few thousand lines of chat wouldn't really be that bad right?
It all depends on what the server operator wants. Do they want to keep a lot of history or a certain number of days, lines, etc..
-- Whasf

User avatar
whasf
Site Admin
Posts: 1312
Joined: Thu Jul 19, 2012 9:11 pm

Re: Audit_Chat

Post by whasf » Wed Oct 23, 2013 12:01 pm

Xx_DeMoLiSH wrote:(Attached .patch file)

Why not put both checks on the same line?

In packet_system.cpp:

Code: Select all

if (map_config.audit_chat == 1 && map_config.audit_shout==1)
-- Whasf

Post Reply