Fixing coke handler and login (a nice cleanup)
[tpg/opendispense2.git] / src / cokebank_basic / main.c
index 11b822c..ae111d4 100644 (file)
@@ -11,6 +11,7 @@
 #include <stdio.h>
 #include <pwd.h>
 #include <string.h>
+#include <openssl/sha.h>
 #include "common.h"
 
 // === IMPORTS ===
@@ -77,7 +78,7 @@ int Transfer(int SourceUser, int DestUser, int Ammount, const char *Reason)
  */
 int GetBalance(int User)
 {
-       return 0;
+       return Bank_GetUserBalance(User);;
 }
 
 /**
@@ -130,16 +131,3 @@ int GetUserID(const char *Username)
        return ret;
 }
 
-/**
- * \brief Authenticate a user
- * \return User ID, or -1 if authentication failed
- */
-int GetUserAuth(const char *Username, const char *Password)
-{
-       #if HACK_TPG_NOAUTH
-       if( strcmp(Username, "tpg") == 0 )
-               return GetUserID("tpg");
-       #endif
-       return -1;
-}
-

UCC git Repository :: git.ucc.asn.au