• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

All Chat window to mysql

xavierek

New Member
Joined
Apr 11, 2009
Messages
209
Reaction score
0
Hello some one have idea how to make all chat in game save to mysql

can i take chanal name in function on say ?
 
Actually onSay has channel id as fourth parameter, but that's bad idea. Instead go handle Chat::talk or ChatChannel::talk in chat.cpp, make some messages map and store them in RAM, then each server save dump them to MySQL.
 
i need it on real time to make some like chat out of tibia ;)
 
Maybe set 'channel' log="yes" in channels.xml and add globalevent that load channel .log file and add all to mysql (and read from mysql texts written by www users and 'sendToChannel') ;)
If you have fast HDD and no problems with lags :p
 
It is very easy to do actually to make it live on a website without any serious latency problems. If someone is just able to write a script for me in c++/lua that will POST the message to my php script every time someone writes something I will do the rest of sending the data straight to the client
 
yeh i know use auto responder in tomecad if change send to user new messages only
 
I managed like month ago to integrate my OTS with IRC, you had channel ingame called #Tibia and when you wrote something, data was sent to IRC via previously registered user, it looked like:
<time> <ots name> : <player name> [level]: msg

:p
 
Back
Top