Feature Idea - Log admin commands to separate file

What do you want to see in Armagetron soon? Any new feature ideas? Let's ponder these ground breaking ideas...
Post Reply
Moofie
Core Dumper
Posts: 125
Joined: Fri Jan 27, 2012 1:36 am
Location: Ohio
Contact:

Feature Idea - Log admin commands to separate file

Post by Moofie »

Well, I looked and I can't find anything related to this, in ingame-commands option or forum posts. I think it'd be very useful to be able to log admin commands to a separate file. This way you'd be able to monitor your admins use easily. Just an idea.
User avatar
AI-team
Shutout Match Winner
Posts: 1020
Joined: Tue Jun 23, 2009 6:17 pm
Location: Germany/Munich
Contact:

Re: Feature Idea - Log admin commands to separate file

Post by AI-team »

Nice idea, should be easy to implement
  
 
"95% of people believe in every quote you post on the internet" ~ Abraham Lincoln
 
 
epsy
Adjust Outside Corner Grinder
Posts: 2003
Joined: Tue Nov 07, 2006 6:02 pm
Location: paris
Contact:

Re: Feature Idea - Log admin commands to separate file

Post by epsy »

Admin commands have a very specific format, why don't you just grep it?
Moofie
Core Dumper
Posts: 125
Joined: Fri Jan 27, 2012 1:36 am
Location: Ohio
Contact:

Re: Feature Idea - Log admin commands to separate file

Post by Moofie »

Well I mean I can do that, but just in general it'd be cool to see all the commands they've been doing in my servers. I think others would like it too, that's why I made a post.
User avatar
Z-Man
God & Project Admin
Posts: 11587
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Re: Feature Idea - Log admin commands to separate file

Post by Z-Man »

epsy wrote:Admin commands have a very specific format, why don't you just grep it?
+1 Oh no I'm doing that too, now.
This is a task better left to an outside tool.
User avatar
Light
Reverse Outside Corner Grinder
Posts: 1667
Joined: Thu Oct 20, 2011 2:11 pm

Re: Feature Idea - Log admin commands to separate file

Post by Light »

I know this post is old, but it couldn't hurt to give a solution, right? :P

Assuming you use the regular setup instructed on the wiki .. otherwise, you probably know how to modify it.

Code: Select all

#!/bin/bash

if [ ! -z "$1" ]; then
	servers="/home/<YOUR USERNAME>/armagetronad/servers"
	ladderlog="${servers}/${1}/var/ladderlog.txt"
	adminlog="${servers}/${1}/var/adminlog.txt"
	
	tail -f $ladderlog | grep --line-buffered '^ADMIN_COMMAND' | tee -a $adminlog
fi
An additional option would be to use sed and add the date to the beginning of each line for convenience.

Code: Select all

#!/bin/bash

if [ ! -z "$1" ]; then
   servers="/home/<YOUR USERNAME>/armagetronad/servers"
   ladderlog="${servers}/${1}/var/ladderlog.txt"
   adminlog="${servers}/${1}/var/adminlog.txt"
   
   tail -f $ladderlog | grep --line-buffered '^ADMIN_COMMAND' | sed -u "s/^ADMIN_COMMAND/`date +%m-%d-%y\ %H:%M:%S`:/" | tee -a $adminlog
fi
I think there's also a build that included this, but its not on the most used, sty+ct as far as I know. You can correct me if I'm wrong .. I didn't really look into it.
Last edited by Light on Sun Feb 10, 2013 6:14 am, edited 2 times in total.
User avatar
LOVER$BOY
Match Winner
Posts: 731
Joined: Thu Jan 24, 2008 12:46 pm

Re: Feature Idea - Log admin commands to separate file

Post by LOVER$BOY »

This is an old post but my reply and my implementation is also old.

I've already implemented ADMIN_LOG in sty+ct+ap, the Alpha Project builds I mean. Z-Man can take it directly and implement it into the others if he wants, I've got no problems :)

Most of the features I've implemented in sty+ct+ap are definitely going to waste but oh well. It's not bothering me anymore since I know, one day or another, sty+ct+ap will disappear. So why bother implement more when it's pointless... It's all a waste.
Last edited by LOVER$BOY on Sun Feb 10, 2013 12:05 am, edited 1 time in total.
Image
User avatar
Light
Reverse Outside Corner Grinder
Posts: 1667
Joined: Thu Oct 20, 2011 2:11 pm

Re: Feature Idea - Log admin commands to separate file

Post by Light »

LOVER$BOY wrote:I've already implemented ADMIN_LOG in sty+ct+ap, the Alpha Project builds I mean. Z-Man can take it directly and implement it into the others if he wants, I've got no problems :)

Most of the features I've implemented in sty+ct+ap are definitely going to waste but oh well. It's not bothering me anymore since I know, one day or another, sty+ct+ap will disappear. So why bother implement more when it's pointless... It's all a waste.
I knew I've seen someone with an admin log before, but wasn't sure if it was actually in a build or not. I never actually tried the ap build. Is there anything there worth moving over for? Sounded kind'a mean, but I just don't know what extras are in it. I've always used the sty+ct builds.
User avatar
Light
Reverse Outside Corner Grinder
Posts: 1667
Joined: Thu Oct 20, 2011 2:11 pm

Re: Feature Idea - Log admin commands to separate file

Post by Light »

While I'm asking, since you know what's in it better than me .. Is there anything in the 0.4 builds worth moving to over the sty+ct? Can the 0.4 have flags and whatnot for CTF, or is that only in ct? I know I could rig up my own script support for it, so that part ain't really an issue. I just don't know what I would lose, but I'm curious to what I would gain.
User avatar
LOVER$BOY
Match Winner
Posts: 731
Joined: Thu Jan 24, 2008 12:46 pm

Re: Feature Idea - Log admin commands to separate file

Post by LOVER$BOY »

man, I didn't expect to give a lecture when I posted here :P

Why don't you visit this website and find out for yourself?
http://vertrex.tk/wiki/

The entire list of our commands are here: http://vertrex.tk/wiki/List_of_Commands

To see every single of my changes since revision 766, you'll find them here: http://bazaar.launchpad.net/~armagetron ... EWS-BRANCH

The extras I didn't cover there are:
  • Custom TEAMNAME_

    Code: Select all

    Meaning, you can have your own team name except in team matches.
  • Auto Tab Completion

    Code: Select all

    Works basically in the client wise which is similar to 0.4. Enter a name into chat and hit TAB. It should automatically fill the entire name by the nearest match. If it doesn't, then players with that matching term in their name are not in the server. Works for players names and commands. I'm the only one who uses the sty+ct+ap client builds and I use this feature a lot!
  • Friends Casing

    Code: Select all

    It is clear use of irregular letters in name causes some hassle for server but this choice setting will be good for those prefered to search for mates use that kind of name. This was inspired by Phytotron
  • * indicator before player's name if they are typing something or simply being idle (Windows not being active)
  • *DEAD* Tag is displayed locally to those who are dead. Spectators don't deserve a tag. This is a client feature only.
  • Map/Config rotation to rotate maps/configs around the round or match randomly or in an orderly fashion
  • Map/Config Queueing which halts Map/Config rotation.

    Code: Select all

    If Queue is not empty, it loads maps/configs from the queue every round. After completion and the queue is empty, normal map/config rotation will continue from where it left off.
  • Race Timer and Adding scores.

    Code: Select all

    This is a very nice feature if your a racing manic. Set up your maps, get settings organised and start racing! Time records are also recorded depending on the settings.
  • Map DTD Features.

    Code: Select all

    We have officially released our Alpha Project's DTD. map-0.2.9_styctap_v1.0.dtd. It contains the most amazing features of all. Instead of using DELAY_COMMAND -1 SPAWN_ZONE to place maps or have them move about, you can now using <Move /> Element inside of <ShapeCircle> to get the zones moving about. All related attributes are located in our DTD.
    
    In the later versions, you can implement the <Move route="x1 y1 x2 y2" /> which is quite handy than the use of SPAWN_ZONE.
    
    We have also added <Zone delay="">...</Zone> which is of-course, the number of seconds the zone should not appear in the grid for.
    
    Along with that, another implementation was done for <ShapeCircle rotation=""> which is to say, the speed at which the zone will rotate.
Anyway, I've been keeping my branch to date with the works that Z-Man and the others implemented in 0.4 and 0.2.8. I've already gone into a separate dimension with my branch that sty+ct can't exactly get along with mine now...
Image
Post Reply