From 73f352f9eda9daaf327de61e2b840cdcf6a7ef68 Mon Sep 17 00:00:00 2001
From: Nigel Kukard <nkukard@lbsd.net>
Date: Sat, 22 Jun 2013 21:53:53 +0000
Subject: [PATCH] Removed more functions & added VERSION to globals

---
 opentrafficshaperd | 28 +---------------------------
 1 file changed, 1 insertion(+), 27 deletions(-)

diff --git a/opentrafficshaperd b/opentrafficshaperd
index 65b2669..46ef652 100755
--- a/opentrafficshaperd
+++ b/opentrafficshaperd
@@ -233,6 +233,7 @@ sub init
 	# Certain things we need
 	$globals->{'users'} = { };
 	$globals->{'logger'} = $logger;
+	$globals->{'version'} = VERSION;
 
 	# Load dictionaries
 	$logger->log(LOG_INFO,"[MAIN] Initializing dictionaries...");
@@ -288,31 +289,4 @@ sub plugin_register {
 	return 0;
 }
 
-
-# Simple function to reduce everything to kbit
-sub getKbit
-{
-	my ($counter,$quantifier) = @_;
-
-	# If there is no counter, return 0
-	return 0 if (!defined($counter));
-
-	# We need a quantifier
-	return undef if (!defined($quantifier));
-
-	# Initialize counter
-	my $newCounter = $counter;
-
-	if ($quantifier =~ /^m$/i) {
-		$newCounter = $counter * 1024;
-	} elsif ($quantifier =~ /^k$/i) {
-		$newCounter = $counter * 1;
-	} else {
-		return undef;
-	}
-
-	return $newCounter;
-}
-
-
 # vim: ts=4
-- 
GitLab