Pages: [1]   Go Down
  Print  
Author Topic: Logging group_bits  (Read 793 times) Bookmark and Share
Moderator
*
OS: Linux
Type: Owner dedicated server(s)
Gameservers: UrT
Posts: 55
Offline Offline
WWW
« on: October 07, 2010, 06:39:03 AM »

Sometimes I thought it would be nice to know when I gave somebody rights
or when I revoked them. Of course there are a lot of ways to change the
right - ingame, echelon, database directly - which means that it's not enough
to add a logging function to the b3 command !putgroup or to echelon. If you
have mysql 5.0.2 or above it's easy anyway since you can use triggers.

There are two sql files. The first sql file table_create.sql creates a table
group_bits_log where you can see the changes of group_bits in the table
clients. The second file trigger_create.sql creates the triggers, which fill
the table group_bits_log.

Your mysql use must have the right to create new tables and triggers.

Let MYSQLUSER be your mysql user (for example root) and B3DB the database name
of the b3 database.

mysql -u MYSQLUSER -p B3DB < table_create.sql
mysql -u MYSQLUSER -p B3DB < trigger_create.sql

That's all.

If you want to know the group_bits changes of id 42 let's say, just go into
mysql client and type
select * from group_bits_log where client_id = 42 order by time;

Download: http://www.bigbrotherbot.net/forums/downloads/?sa=view;down=118

(This is not a plugin, so feel free to move this topic where you want. I didn't find a better place.)
« Last Edit: October 30, 2010, 12:18:07 PM by BlackMamba » Logged


Former Dev. (senate)
*****
OS: Linux
Type: Owner dedicated server(s)
Gameservers: OpenArena
Posts: 258
Offline Offline
« Reply #1 on: October 20, 2010, 05:51:44 AM »

Nice addition !

You should add it in the Downloads Misc Files section, here :

http://www.bigbrotherbot.net/forums/downloads/?cat=11

I think it can be very useful !
Logged
Full Member
***
OS: Windows
Type: Owner dedicated server(s)
Gameservers: CoD4, CoD6, CoD7
Posts: 80
Offline Offline
Currently hosting 40+ b3 Bots!!!
WWW
« Reply #2 on: December 23, 2011, 11:05:32 PM »

I am trying to get this to work, but so far it has not detected any changes I make in-game.  Does this only work for changes made manually in the database, or is it malfunctioning for me?

Brendan West
Logged
Tags: log group_bits rights 
Pages: [1]   Go Up
  Print  
 
Jump to:  


Rate this page +1 at Google Search


SimplePortal 2.3.1 © 2008-2009, SimplePortal