Audit_Chat
Re: Audit_Chat
dunno
- Attachments
-
- audit_chat(1).patch
- (4.63 KiB) Downloaded 326 times
Click here for a guide on scripting missions.<Giblet[NewBrain]> kj with this first step would be fine on my shit
Re: Audit_Chat
The only other thing that would be awesome to be configurable in that particular source file, would be yell as world chat on/off... But that might be asking too much to be committed. lol I just think its awesome for smaller servers like mine.
I currently have it on mine so maybe.. I dunno, I'll commit your patch, then re-modify the yell as world chat, again, but how hard is it to add something to the config? Just adding the line you used for this?
Currently this is how that is setup:
(packetsystem.cpp)
I currently have it on mine so maybe.. I dunno, I'll commit your patch, then re-modify the yell as world chat, again, but how hard is it to add something to the config? Just adding the line you used for this?
Currently this is how that is setup:
(packetsystem.cpp)
Code: Select all
case MESSAGE_YELL:
{
if (map_config.audit_chat == 1 && map_config.audit_yell == 1)
for (uint16 zone = 0; zone < 284; ++zone)
{
zoneutils::GetZone(zone)->PushPacket(
PChar,
CHAR_INZONE,
new CChatMessagePacket(PChar, MESSAGE_SHOUT, data+6));
}
}break;
Re: Audit_Chat
Mostly correct but you missed the "{" after the audit check and the "}" for the end.
EDIT: Didn't realise the audit code disappeared
EDIT: Didn't realise the audit code disappeared
Last edited by demolish on Wed Oct 23, 2013 4:06 pm, edited 1 time in total.
Click here for a guide on scripting missions.<Giblet[NewBrain]> kj with this first step would be fine on my shit
Re: Audit_Chat
Lol when I did it, I over-wrote the code that tells it to add to audit_chat. I gotta re-do it anyway.
Code: Select all
case MESSAGE_YELL:
{
if (map_config.audit_chat == 1 && map_config.audit_yell == 1)
{
std::string qStr = ("INSERT into audit_chat (speaker,type,message,datetime) VALUES('");
qStr +=PChar->GetName();
qStr +="','WORLD','";
qStr += escape(data+6);
qStr +="',current_timestamp());";
const char * cC = qStr.c_str();
Sql_QueryStr(SqlHandle, cC);
}
for (uint16 zone = 0; zone < 284; ++zone)
{
zoneutils::GetZone(zone)->PushPacket(
PChar,
CHAR_INZONE,
new CChatMessagePacket(PChar, MESSAGE_SHOUT, data+6));
}
}break;
Last edited by tagban on Wed Oct 23, 2013 4:00 pm, edited 1 time in total.
Re: Audit_Chat
Good point o.o
Didn't notice that haha
Didn't notice that haha
Click here for a guide on scripting missions.<Giblet[NewBrain]> kj with this first step would be fine on my shit
Re: Audit_Chat
Got it.
http://bnet.cc/ffxi/chat.php
Thanks!
I am POSITIVE, there is something more efficient than this to do this, but whatever, it works for now, I just want to make sure that beyond 10 messages, it doesn't keep them. Mostly just a proof of concept page.
http://bnet.cc/ffxi/chat.php
Thanks!
Code: Select all
<?php
mysql_connect("ipaddressOfSQL", "sqlUserName", "sqlPassWord") or die(mysql_error());
mysql_select_db("dspdb") or die(mysql_error());
$querySay = "SELECT * FROM audit_chat WHERE type = 'SAY' order by lineid desc limit 10";
$resultSay = mysql_query($querySay) or die(mysql_error());
$queryShout = "SELECT * FROM audit_chat WHERE type = 'SHOUT' order by lineid desc limit 10";
$resultShout = mysql_query($queryShout) or die(mysql_error());
$queryYell = "SELECT * FROM audit_chat WHERE type = 'WORLD' order by lineid desc limit 10";
$resultYell = mysql_query($queryYell) or die(mysql_error());
$queryLS = "SELECT * FROM audit_chat WHERE type = 'LINKSHELL' order by lineid desc limit 10";
$resultLS = mysql_query($queryLS) or die(mysql_error());
// Show last 10 SAY Chats
echo"<b>Say</b><hr>";
while($row = mysql_fetch_array($resultSay)){
echo $row['speaker']. " : ". $row['message'];
echo "<br />";
}
// Show last 10 LINKSHELL Chats
echo"<hr><b>Linkshell</b><hr>";
while($row = mysql_fetch_array($resultLS)){
echo $row['speaker']. " : ". $row['message'];
echo "<br />";
}
// Show last 10 WORLD Chats
echo"<hr><b>World (/yell)</b><hr>";
while($row = mysql_fetch_array($resultYell)){
echo $row['speaker']. " : ". $row['message'];
echo "<br />";
}
// Show last 10 SHOUT Chats
echo"<hr><b>Shout</b><hr>";
while($row = mysql_fetch_array($resultShout)){
echo $row['speaker']. " : ". $row['message'];
echo "<br />";
}
?>
Re: Audit_Chat
not sure if the client lets you /yell outside of the actual /yell zones (jeunos, adoulins, whitegate) but other than that it would be fun. hell, if it does, i'll probably just fix the packet and trunk it
Re: Audit_Chat
It actually does entirely. I'm in SGusta and everyone can see my chat.kjLotus wrote:not sure if the client lets you /yell outside of the actual /yell zones (jeunos, adoulins, whitegate) but other than that it would be fun. hell, if it does, i'll probably just fix the packet and trunk it
Join me to try if you want:
ffxi.bnet.cc
Im now looking into adding events to the system, IE: when someone logs onto the server a 'world' announcement "Kjlotus has logged in" or something.. But I'm happy with what I'm messing with right now. And not a pro at any of this, so learning as I go/tweak/break stuff.
Re: Audit_Chat
ah, sweet
you could make a character named Server, and have the server spoof a packet from that character (assuming the packet needs charid - if not, you just spoof a packet with that name) and hook that into the login function (or char building or whatever)
once i'm done midterms maybe i'll get yell in the trunk haha
you could make a character named Server, and have the server spoof a packet from that character (assuming the packet needs charid - if not, you just spoof a packet with that name) and hook that into the login function (or char building or whatever)
once i'm done midterms maybe i'll get yell in the trunk haha
Re: Audit_Chat
Sounds legit, You should trunk in the Audit_chat settings also. Since by default they are off, shouldn't hurt anything.