documentation
download & extend
community & support
B3 hosting
May 21, 2012, 06:03:02 PM
Home
Features
Get Started
Supported Games
Forums
Help
Search
Tags
Groupware
Login
Register
Activation Mail
It appears you have not registered with our community. To register please click here ...
You are here:
Big Brother Bot Forum
Add-Ons
Echelon
Commands Log
Pages: [
1
]
Go Down
« previous
next »
Print
Author
Topic: Commands Log (Read 507 times)
KaGDeadz
Jr. Member
OS: --No B3 installed--
Type: Renting Server with B3
Gameservers:
cod4
Posts: 21
Offline
Commands Log
«
on:
August 30, 2011, 03:40:30 PM »
had a look around the forum but havent really looked into yet myself.
Is there a way to display/log commands used,
chatlog easily shows commands in a different colour but is there a way to have the commands in a seperate list/table,
and a way to show most popular or commands used by a client, in the same way the last chat messags are displayed under a client.
Just a thought as i believe it would be helpful for moderating immature admins,
and generally seeing what people like to use most, what needs to be developed on.
as always thanks in advance for any replys/information.
Logged
MordyT
Support Hero
OS: Windows
Type: Gameserver Rental Co.
Gameservers:
2x CoD4, 1x BF3
Posts: 2625
Offline
Owner of Host4B3.com - Over 70 bots hosted!
Re: Commands Log
«
Reply #1 on:
August 30, 2011, 05:57:09 PM »
Well, echelon 2 has a admin action table, so when visiting a client you can see what he used and when... echelon 2 is in beta though and has broken things...
Aside from that, you could use a .sql query (you would have to make it though) to soft through the database.
Logged
Need B3 Bot hosting? Check out
Host4B3.com
Check
Twitter.com/Host4B3
for updates if the site it down.
Help will be given to those with a b3.log
System: Python 2.7.1 - B3 Source Code - Locally hosted MySQL & Apache - Win 2k3
BlackMamba
Full Member
OS: Linux
Type: Owner dedicated server(s)
Gameservers:
UrT
Posts: 55
Offline
Re: Commands Log
«
Reply #2 on:
August 31, 2011, 12:03:25 AM »
Here is a sql statement to show kill and ban statistics:
http://www.bmamba.de/?p=221
Logged
www.bmamba.de
KaGDeadz
Jr. Member
OS: --No B3 installed--
Type: Renting Server with B3
Gameservers:
cod4
Posts: 21
Offline
Re: Commands Log
«
Reply #3 on:
August 31, 2011, 06:35:54 AM »
Thank you for you replys.
The code you provided will be useful i have no doubt.
I was more looking for all commands used as well as how many times
So a table could be created saying client name, commands used, how many times used,
and then possibly broken down on the clients page underneath last chat messages, last commands used, to clearly display when a command was used and the full criteria whilst using the command.
I did a simple query to find instances when '!' was used this was just to gauge an idea of what needs looking at next, using this:
SELECT * FROM `chatlog`
WHERE (`msg` LIKE '!%')
ORDER BY `chatlog`.`client_name` ASC
Now working on building upon that to filter out things like !! or ! followed by a space.
I would require some knowledge as to how to go about adding this in a form transferable to a table layout on echelon as described above,
or am i barking up the wrong tree and should try just making a new plugin similar to chatlog which only logs commands, and thn be able to transfer to echelon in a similar way.
ooor
am i just trying to do things that are already being developed in echelon 2 and should hold on until a stable relitivly bug free version is released and see what possibilities have been unlocked?
Sorry for asking for so much, I understand that what im asking may not be all that clear and maybe very far fetched.
I'm fairly new to coding therefore also fairly new to B3 and its workings,
but find it interesting when you have an idea like this and how to overcome the smallest of issues.
as always thanks for taking the time to read and thank you in advance for any replys.
Logged
Courgette
Senior Dev.
OS: Linux
Type: Home user
Posts: 3483
Offline
Support Specialty:
B3-Core, UrT/SmG/BFBC2 parsers, Plugin development
Re: Commands Log
«
Reply #4 on:
August 31, 2011, 11:27:02 AM »
Quote from: KaGDeadz on August 31, 2011, 06:35:54 AM
... a new plugin similar to chatlog which only logs commands
If you want to try that one, then make your plugin listen for the EVT_ADMIN_COMMAND event which is raised by the admin plugin whenever a command is issued. This event is associated to data which is a tuple composed of : (command, data, results).
I guess this could be easily added to the actual chatlogger plugin. If you have the time and feel comfortable, please do so and provide me with a patch. I'll be glad to release a new version of the chatlogger plugin with your changes.
Logged
Follow me :
@cucurb
.~. new
Smokin' guns official website
KaGDeadz
Jr. Member
OS: --No B3 installed--
Type: Renting Server with B3
Gameservers:
cod4
Posts: 21
Offline
Re: Commands Log
«
Reply #5 on:
September 01, 2011, 05:41:29 AM »
Quote from: Courgette on August 31, 2011, 11:27:02 AM
If you want to try that one, then make your plugin listen for the EVT_ADMIN_COMMAND event which is raised by the admin plugin whenever a command is issued.
Excelant idea, forgot about the tpe of events i could use
Thanks buddy i will take a look and see what damage i can do.
Logged
BlackMamba
Full Member
OS: Linux
Type: Owner dedicated server(s)
Gameservers:
UrT
Posts: 55
Offline
Re: Commands Log
«
Reply #6 on:
September 01, 2011, 10:12:45 AM »
I added some code to chatlogger. Now the plugin logs commands to the database. I added a pull request if you want to add the code, courgette.
(
https://github.com/bmamba/b3-plugin-chatlogger
)
Logged
www.bmamba.de
Courgette
Senior Dev.
OS: Linux
Type: Home user
Posts: 3483
Offline
Support Specialty:
B3-Core, UrT/SmG/BFBC2 parsers, Plugin development
Re: Commands Log
«
Reply #7 on:
September 01, 2011, 12:11:05 PM »
Thanks BlackMamba. I've released
v1.1.1 of the chatlogger plugin
which integrates your changes.
Logged
Follow me :
@cucurb
.~. new
Smokin' guns official website
KaGDeadz
Jr. Member
OS: --No B3 installed--
Type: Renting Server with B3
Gameservers:
cod4
Posts: 21
Offline
Re: Commands Log
«
Reply #8 on:
September 02, 2011, 08:02:06 AM »
Quote from: Courgette on September 01, 2011, 12:11:05 PM
Thanks BlackMamba. I've released
v1.1.1 of the chatlogger plugin
which integrates your changes.
Installed and tested on server.
unfortunatly came up with error when trying to log, this is in short whwat it said.
Code:
110902 16:54:44
ERROR
handler ChatloggerPlugin could not handle event Say: NameError: global name 'MySQLdb' is not defined [(\\b3\\extplugins\\chatlogger.py', 303, '_save2db', 'except MySQLdb.ProgrammingError, e:')]
line 303 of chatlogger.py is as follows
Code:
except MySQLdb.ProgrammingError, e:
how this is relavant
Code:
def _save2db(self, data):
q = self._insertquery()
try:
cursor = self.plugin.console.storage.query(q, data)
if (cursor.rowcount > 0):
self.plugin.debug("rowcount: %s, id:%s" % (cursor.rowcount, cursor.lastrowid))
else:
self.plugin.warning("inserting into %s failed" % self._table)
except MySQLdb.ProgrammingError, e:
if e[0] == 1146:
self.plugin.error("Could not save to database : %s" % e[1])
self.plugin.info("Refer to this plugin readme file for instruction on how to create the required tables")
else:
self.plugin.error("Could not save to database : %s" % e)
Any ideas?
Is it relevant that i am running B3 v1.5?
«
Last Edit: September 02, 2011, 08:42:48 AM by KaGDeadz
»
Logged
MordyT
Support Hero
OS: Windows
Type: Gameserver Rental Co.
Gameservers:
2x CoD4, 1x BF3
Posts: 2625
Offline
Owner of Host4B3.com - Over 70 bots hosted!
Re: Commands Log
«
Reply #9 on:
September 02, 2011, 09:49:35 AM »
Quote from: KaGDeadz on September 02, 2011, 08:02:06 AM
Is it relevant that i am running B3 v1.5?
I thought chatlogger 1.0 and up need b3 1.6.1 and up?
Logged
Need B3 Bot hosting? Check out
Host4B3.com
Check
Twitter.com/Host4B3
for updates if the site it down.
Help will be given to those with a b3.log
System: Python 2.7.1 - B3 Source Code - Locally hosted MySQL & Apache - Win 2k3
BlackMamba
Full Member
OS: Linux
Type: Owner dedicated server(s)
Gameservers:
UrT
Posts: 55
Offline
Re: Commands Log
«
Reply #10 on:
September 02, 2011, 11:10:55 AM »
Did you create the table cmdlog (see chatlogger.sql)? Could you paste the whole log file?
Logged
www.bmamba.de
Tags:
Pages: [
1
]
Go Up
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
General Category
-----------------------------
=> News (Read Only)
===> News Archive
===> Website News
=> General Discussion
===> Servers
=> Shared Services
-----------------------------
Support Forums
-----------------------------
=> Support Instructions
=> Installation Support
=> General Usage Support
=> Game specific Support
===> Battle Field 3
=====> BF3/B3 beta board
===> Battle Field Bad Company 2
===> Call of Duty series
=====> CoD, CoD:UO, CoD2
=====> Call of Duty 4 (Modern Warfare)
=====> Call of Duty 5 (World at War)
=====> Call of Duty 6 (Modern Warfare 2)
=====> Call of Duty 7 (Black Ops)
=======> AlterOps
===> Frontlines, Fuel of War
===> Enemy Territory
===> Homefront
===> Medal of Honor 2010
===> Open Arena
===> Red Orchestra 2
===> Smokin' Guns
===> Soldier of Fortune 2
===> Urban Terror
===> World of Padman
===> Other games
-----------------------------
Add-Ons
-----------------------------
=> Plugins Discussion
===> Plugin Releases!
===> Plugins by xlr8or
===> Plugins by Courgette
===> Plugins by Freelander
===> Plugins by Bakes
===> Plugins by Ismael
===> Plugins by flinkaflenkaflrsk
===> Plugins by Anubis
===> Plugins by Spoon
===> Plugins by PtitBigorneau
===> Plugins by BlackMamba
===> Plugins by Beber888
===> Plugins by grosbedo
=> XLRstats
===> Weaponmodifiers
=> Echelon
===> Echelon version 2
=> Configurations
=> Installers
-----------------------------
Community Developers
-----------------------------
=> Plugin Developers
=> The Code Bin
Rate this page +1 at Google Search
Web Toolbar by Wibiya
SimplePortal 2.3.1 © 2008-2009, SimplePortal