March 11, 2010, 07:15:34 AM
Home
Forums
Help
Search
Tags
Documentation
GitHub Wiki
Cheatsheet
Downloads
Source Code
Stable dev repo
XLR8or's dev repo
Login
Register
Activation Mail
You are here:
Big Brother Bot Forum
Add-Ons
Plugins
Releases!
chatlogger plugin v0.2.0
Pages: [
1
]
2
3
...
7
Go Down
« previous
next »
Print
Author
Topic: chatlogger plugin v0.2.0 (Read 13806 times)
Courgette
Dev. Team
Hero Member
OS: Linux
Type: Owner dedicated server(s)
Gameservers:
UrT, SmG
Posts: 1133
Offline
chatlogger plugin v0.2.0
«
on:
July 28, 2008, 10:55:53 AM »
Description:
This plugin logs to database all clients' messages (chat, team chat, private chat).
It has an option to automatically delete old messages from database.
Changelog :
28/07/2008 - 0.0.1
- manage say, teamsay and privatesay messages
14/08/2008 - 0.1.0
- fix security issue with player names or messages containing double quote or antislash characters (Thx to
Anubis
for report and tests)
- option to setup a daily purge of old messages to keep your database size reasonable
13/09/2008 - 0.1.1
- in config, the hour defined for the purge is now understood in the timezone defined in the main B3 config file (before, was understood as UTC time)
- fix mistake in log text
7/11/2008 - 0.1.2 - xlr8or
- added missing 'import b3.timezones'
22/12/2008 - 0.2.0
- allow to use a customized table name for storing the
log to database. Usefull if multiple instances of the
bot share the same database.
Thanks to Eire.32 for bringing up the idea and testing.
Download :
v0.2.0
(
mirrors
)|
source code repository
(
RSS feed
)
App to display the log
* echelon : the developpement version
(risky, make a backup of your version used in production)
Download :
http://xlr8or.snt.utwente.nl/hg/echelon
«
Last Edit: October 13, 2009, 11:17:07 PM by Courgette
»
Logged
|FaLLeN| Op-X
Full Member
Posts: 95
Offline
Re: chatlogger plugin v0.0.1
«
Reply #1 on:
July 28, 2008, 04:51:54 PM »
installed and chat shows up on the tables
great work! just need the echelon page
Logged
xfire=specialopx
www.fallenclan.com
wurst
Jr. Member
Posts: 20
Offline
Re: chatlogger plugin v0.0.1
«
Reply #2 on:
July 29, 2008, 01:14:01 AM »
weeeeee!
thx very much, i just installed --> working.
to query simply the output is maybe problematic cause privacy ethical copyright stuffs, im looking forward to authenticate it with phpbb.
so sry that i cant give a direct link now...
heres the script that i use to output html table. plz be patient, im no programmer i just stole several howtos with the gugel,
but i swear i will make some nice, specially after i found out what to do with the msg_time
Code:
<?php
//wursti shitty klickery
//enter right text plz!!!!!!!!!!!!!!!!!!!!!:
$dbhost='localhost';
$dbusername='myuser';
$dbuserpass='mypw';
$dbname='b3DBname';
$header='playerchat table';
//connectomatrix.
$db = mysql_connect ($dbhost, $dbusername, $dbuserpass) or die(mysql_error());
//selectomatrix.
mysql_select_db($dbname, $db) or die('Cannot select database');
$query = 'SELECT ch.`msg_time`, ch.`msg_type`, c.`name`, ch.`msg` FROM `chatlog` as ch INNER JOIN `clients` as c ON ch.`client_id` = c.`id` ORDER BY `msg_time` DESC LIMIT 0, 50';
$result = mysql_query($query, $db);
if (mysql_errno($db) == 0)
echo "$header <br><br>";
else
echo mysql_error();
//Call table
?><table><tr><?
if(! $result) { ?><th>result not valid</th><? }
else {
$i = 0;
while ($i < mysql_num_fields($result)) {
$meta = mysql_fetch_field($result, $i);
?><th style="white-space:nowrap"><?=$meta->name?></th><?
$i++;
}
?></tr><?
if(mysql_num_rows($result) == 0) {
?><tr><td colspan="<?=mysql_num_fields($result)?>">
<strong><center>no result</center></strong>
</td></tr><?
} else
while($row=mysql_fetch_assoc($result)) {
?><tr style="white-space:nowrap"><?
foreach($row as $key=>$value) { ?><td><?=$value?></td><? }
?></tr><?
}
}
?></table><?
?>
edit: msg_type in output
edit2: could we save resources by removing the client name from chatlog table?
«
Last Edit: July 29, 2008, 01:58:11 AM by wurst
»
Logged
xlr8or
[ www.xlrstats.com ]
Project leader
Hero Member
OS: Linux
Type: Owner dedicated server(s)
Gameservers:
CoD, CoD2, CoD5, UrT
Posts: 1209
Offline
Re: chatlogger plugin v0.0.1
«
Reply #3 on:
July 29, 2008, 02:01:50 AM »
@tomdesinto: I've set you up a repository for the chatlogger.
Logged
Serving:
CoD2
|
CoD5
|
UrT4.1
Courgette
Dev. Team
Hero Member
OS: Linux
Type: Owner dedicated server(s)
Gameservers:
UrT, SmG
Posts: 1133
Offline
Re: chatlogger plugin v0.0.1
«
Reply #4 on:
July 29, 2008, 02:44:33 AM »
@xlr8or: thx again, I'll push the code tonight
Quote from: wurst on July 29, 2008, 01:14:01 AM
edit2: could we save resources by removing the client name from chatlog table?
I think it's interresting to keep track of under what name things were said, as problematic players often use aliasing.
Logged
wurst
Jr. Member
Posts: 20
Offline
Re: chatlogger plugin v0.0.1
«
Reply #5 on:
July 30, 2008, 05:36:24 AM »
hm je, the alias of the moment when it was said is important.
sure a link to the alias list of that player id could make it perfect then...
playernames get changed afterwards in clients table, if u reconnect with another username and same ip.
i found that out yesterday...
btw, i have the script now with fancy date, a player helped me out after i tryed for hours to change some in the query wit unix date...
here it is:
Code:
<?php
//wursti shitty klickery
//enter tekst:
$dbhost='host';
$dbusername='user';
$dbuserpass='pw';
$dbname='dbname';
$header='this is the realtime playerchat table';
//connectomatrix.
$db = mysql_connect ($dbhost, $dbusername, $dbuserpass) or die(mysql_error());
//selectomatrix.
mysql_select_db($dbname, $db) or die('Cannot select database');
$query = 'SELECT ch.`msg_time`, ch.`msg_type`, c.`name`, ch.`msg` FROM `chatlog` as ch INNER JOIN `clients` as c ON ch.`client_id` = c.`id` ORDER BY `msg_time` DESC LIMIT 0, 500';
$result = mysql_query($query, $db);
if (mysql_errno($db) == 0)
echo "$header <br><br>";
else
echo mysql_error();
//Call table
?><table><tr><?
if(! $result) { ?><th>result not valid</th><? }
else {
$i = 0;
while ($i < mysql_num_fields($result)) {
$meta = mysql_fetch_field($result, $i);
?><th style="white-space:nowrap"><?=$meta->name?></th><?
$i++;
}
?></tr><?
if(mysql_num_rows($result) == 0) {
?><tr><td colspan="<?=mysql_num_fields($result)?>">
<strong><center>no result</center></strong>
</td></tr><?
} else
// while($row=mysql_fetch_assoc($result)) {
// ?><tr style="white-space:nowrap"><?
// foreach($row as $key=>$value) { ?><td><?=$value?></td><? }
// ?></tr><?
//// }
// }
while($row = mysql_fetch_assoc($result)) {
?><tr style="white-space:nowrap"><?
foreach($row as $key => $value) {
if('msg_time' == $key) {
$value = date("d.m.Y H:i:s", $value);
}
echo "\t<td>$value</td> ";
}
}
?></table><?
?>
i hope i become faster soon, im expirienced network admin but i never wrote my own php...
what to say? lol wurst n00b.
im planning to bring a link on every chat event that query content around this chat line, so theres possibility to say:
"he admin, heres link to the conversation i mean"
oki gg
Logged
Stec
Full Member
Posts: 58
Offline
Re: chatlogger plugin v0.0.1
«
Reply #6 on:
July 30, 2008, 07:12:52 AM »
Quote from: tomdesinto on July 29, 2008, 02:44:33 AM
@xlr8or: thx again, I'll push the code tonight
I think it's interresting to keep track of under what name things were said, as problematic players often use aliasing.
Most definitely. Will try your plugin ASAP.
Logged
Courgette
Dev. Team
Hero Member
OS: Linux
Type: Owner dedicated server(s)
Gameservers:
UrT, SmG
Posts: 1133
Offline
Re: chatlogger plugin v0.0.1
«
Reply #7 on:
July 30, 2008, 07:39:01 AM »
Quote from: wurst on July 30, 2008, 05:36:24 AM
sure a link to the alias list of that player id could make it perfect then...
Not so sure... as it is a acknowledged that alias management with current b3 version can be buggy with certain games (like iourt41).
IMHO it is safer to avoid any dependency with the alias table.
Good luck with your PHP
Logged
xlr8or
[ www.xlrstats.com ]
Project leader
Hero Member
OS: Linux
Type: Owner dedicated server(s)
Gameservers:
CoD, CoD2, CoD5, UrT
Posts: 1209
Offline
Re: chatlogger plugin v0.0.1
«
Reply #8 on:
July 30, 2008, 10:34:20 AM »
Going a tad off topic: Version 1.0.6 of the parser for Urban Terror (iourt41.py) that I pushed today to my repository fixes a few important issues with player synchronization!
v1.0.6 syncs players and handles the events at round end properly. That also affects the tk plugin (cutting points in half at map end) and some stats handling issues.
I am currently testing this parser (it might even fix some alias issues as well).
You can find the parser in this package of B3:
http://xlr8or.snt.utwente.nl/hg/b3?ca=e49274e83881;type=zip
edit: make that version 1.0.7, even better syncing and zombie disconnecting - link above is modified!
«
Last Edit: July 30, 2008, 02:08:36 PM by xlr8or
»
Logged
Serving:
CoD2
|
CoD5
|
UrT4.1
flinkaflenkaflrsk
B3 Contributor
Sr. Member
Posts: 239
Offline
Re: chatlogger plugin v0.0.1
«
Reply #9 on:
July 30, 2008, 01:49:46 PM »
oh that would be a winner!
Logged
Deathslap
Registered plugin
Mapcycle plugin
Stec
Full Member
Posts: 58
Offline
Re: chatlogger plugin v0.0.1
«
Reply #10 on:
July 31, 2008, 01:40:52 AM »
We installed chatlogger plugin on all 3 CoD 4 servers last night and not only was it easy to install but it's working great! Thanks so much for a stellar effort on this plugin. Especially helpful is the client name field right there in the chat log table. It makes it infinitely more useful right away.
Bravo!
Logged
xlr8or
[ www.xlrstats.com ]
Project leader
Hero Member
OS: Linux
Type: Owner dedicated server(s)
Gameservers:
CoD, CoD2, CoD5, UrT
Posts: 1209
Offline
Re: chatlogger plugin v0.0.1
«
Reply #11 on:
July 31, 2008, 08:15:17 AM »
For the bold:
http://xlr8or.snt.utwente.nl/hg/echelon?ca=tip;type=zip
(latest development snapshot of echelon with chatlog and talkback functionality... warning: could be unstable!)
Check the new configuration... it's done solely by editing: Connections/inc_config.php
Logged
Serving:
CoD2
|
CoD5
|
UrT4.1
magoo
Jr. Member
Posts: 11
Offline
Re: chatlogger plugin v0.0.1
«
Reply #12 on:
July 31, 2008, 08:02:23 PM »
What does the "Talkback" function do?
Logged
Courgette
Dev. Team
Hero Member
OS: Linux
Type: Owner dedicated server(s)
Gameservers:
UrT, SmG
Posts: 1133
Offline
Re: chatlogger plugin v0.0.1
«
Reply #13 on:
August 01, 2008, 12:53:44 AM »
Quote from: magoo on July 31, 2008, 08:02:23 PM
What does the "Talkback" function do?
It allows you to send messages that will show up in the game from Echelon
Logged
magoo
Jr. Member
Posts: 11
Offline
Re: chatlogger plugin v0.0.1
«
Reply #14 on:
August 01, 2008, 04:51:58 AM »
O.K., Thanks for the information.
Logged
Tags:
plugin
Pages: [
1
]
2
3
...
7
Go Up
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
General Category
-----------------------------
=> Servers
=> News
=> General Discussion
-----------------------------
Support Forums
-----------------------------
=> Installation Support
=> General Usage Support
=> Game specific Support
===> CoD2
===> CoD4
===> CoD5
===> UrT
===> Other games
-----------------------------
Add-Ons
-----------------------------
=> Installers
=> Plugins
===> Releases!
=> XLR
===> XLR Releases!
=> Configurations
-----------------------------
Community Developers
-----------------------------
=> Plugin Developers
=> The Code Bin