+
+ actualUsername = Bank_GetAcctName(ActualUser);
+ srcName = Bank_GetAcctName(SrcUser);
+ dstName = Bank_GetAcctName(DestUser);
+
+ Log_Info("give %i to %s from %s by %s [balances %i, %i] - %s",
+ Ammount, dstName, srcName, actualUsername,
+ Bank_GetBalance(SrcUser), Bank_GetBalance(DestUser),
+ ReasonGiven
+ );
+
+ free(srcName);
+ free(dstName);
+ free(actualUsername);
+
+ return 0;
+}
+
+/**
+ * \brief Add money to an account
+ */
+int DispenseAdd(int ActualUser, int User, int Ammount, const char *ReasonGiven)
+{
+ int ret;
+ char *dstName, *byName;
+
+ ret = _Transfer( Bank_GetAcctByName(COKEBANK_DEBT_ACCT), User, Ammount, ReasonGiven );
+ if(ret) return 2;
+
+ byName = Bank_GetAcctName(ActualUser);
+ dstName = Bank_GetAcctName(User);
+
+ Log_Info("add %i to %s by %s [balance %i] - %s",
+ Ammount, dstName, byName, Bank_GetBalance(User), ReasonGiven
+ );
+
+ free(byName);
+ free(dstName);
+
+ return 0;
+}
+
+int DispenseSet(int ActualUser, int User, int Balance, const char *ReasonGiven)
+{
+ int curBal = Bank_GetBalance(User);
+ char *byName, *dstName;
+
+ _Transfer( Bank_GetAcctByName(COKEBANK_DEBT_ACCT), User, Balance-curBal, ReasonGiven );
+
+ byName = Bank_GetAcctName(ActualUser);
+ dstName = Bank_GetAcctName(User);
+
+ Log_Info("set balance of %s to %i by %s [balance %i] - %s",
+ dstName, Balance, byName, Bank_GetBalance(User), ReasonGiven