#!/bin/perl

$file = "/home/genethic/var/genethic.log";

open(DATA,"$file");
while(<DATA>) {
	chop;
	($name,$value)=split(/:/);
	if ( $ARGV[0] eq "USERMOVE" && $name =~ /^(USERS_MORE|USERS_LESS)$/ ) {
		print "$value\n";
	} elsif ( $ARGV[0] eq $name ) {
		print "$value\n";
		print "$value\n";
	}
} close(DATA);
print "\n\n";

#LOCAL_USERS:3611
#GLOBAL_USERS:65666
#MAX_LOCAL_USERS:5059
#CHANNEL:32568
#POSITION:6
#USERS_PERCENT:5.49
#USERS_MORE:80
#USERS_LESS:72
#RPING_h69.eu.undernet.org:158
#RPING_h22.eu.undernet.org:179
#RPING_h25.eu.undernet.org:246
#RPING_h12.eu.undernet.org:180
