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.)