From c5e084b898202b34e5f9a8b851be6e803f0e737e Mon Sep 17 00:00:00 2001
From: rswindell <>
Date: Tue, 31 Jan 2006 03:40:02 +0000
Subject: [PATCH] Changed the user_sent_email() implementation to accept BOOL
 feedback arg instead of user number (allow the higher level to determine what
 constitutes feedback or not).

---
 src/sbbs3/email.cpp | 2 +-
 src/sbbs3/userdat.c | 8 ++++----
 src/sbbs3/userdat.h | 6 +++---
 3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/sbbs3/email.cpp b/src/sbbs3/email.cpp
index 17b0c830cf..8072b4aef5 100644
--- a/src/sbbs3/email.cpp
+++ b/src/sbbs3/email.cpp
@@ -305,7 +305,7 @@ bool sbbs_t::email(int usernumber, char *top, char *subj, long mode)
 		logon_fbacks++;
 	else
 		logon_emails++;
-	user_sent_email(&cfg, &useron, usernumber, 1);
+	user_sent_email(&cfg, &useron, 1, usernumber==1);
 	bprintf(text[Emailed],username(&cfg,usernumber,tmp),usernumber);
 	sprintf(str,"%s sent e-mail to %s #%d"
 		,useron.alias,username(&cfg,usernumber,tmp),usernumber);
diff --git a/src/sbbs3/userdat.c b/src/sbbs3/userdat.c
index a8b45ab757..5ee840eb76 100644
--- a/src/sbbs3/userdat.c
+++ b/src/sbbs3/userdat.c
@@ -1886,12 +1886,12 @@ BOOL DLLCALL user_posted_msg(scfg_t* cfg, user_t* user, int count)
 	return(TRUE);
 }
 
-BOOL DLLCALL user_sent_email(scfg_t* cfg, user_t* user, unsigned to_user, int count)
+BOOL DLLCALL user_sent_email(scfg_t* cfg, user_t* user, int count, BOOL feedback)
 {
 	if(user==NULL)
 		return(FALSE);
 
-	if(to_user==1)
+	if(feedback)
 		user->fbacks=(ushort)adjustuserrec(cfg, user->number, U_FBACKS, 5, count);
 	else
 		user->emails=(ushort)adjustuserrec(cfg, user->number, U_EMAILS, 5, count);
@@ -1922,7 +1922,7 @@ BOOL DLLCALL user_uploaded(scfg_t* cfg, user_t* user, int files, long bytes)
 	return(TRUE);
 }
 
-BOOL DLLCALL user_credits_adjusted(scfg_t* cfg, user_t* user, long amount)
+BOOL DLLCALL user_adjust_credits(scfg_t* cfg, user_t* user, long amount)
 {
 	if(user==NULL)
 		return(FALSE);
@@ -1935,7 +1935,7 @@ BOOL DLLCALL user_credits_adjusted(scfg_t* cfg, user_t* user, long amount)
 	return(TRUE);
 }
 
-BOOL DLLCALL user_minutes_adjusted(scfg_t* cfg, user_t* user, long amount)
+BOOL DLLCALL user_adjust_minutes(scfg_t* cfg, user_t* user, long amount)
 {
 	if(user==NULL)
 		return(FALSE);
diff --git a/src/sbbs3/userdat.h b/src/sbbs3/userdat.h
index 05113094eb..cf5415c4fd 100644
--- a/src/sbbs3/userdat.h
+++ b/src/sbbs3/userdat.h
@@ -111,11 +111,11 @@ DLLEXPORT BOOL	DLLCALL filter_ip(scfg_t* cfg, char* prot, char* reason, char* ho
 
 /* New atomic numeric user field adjustment functions: */
 DLLEXPORT BOOL	DLLCALL user_posted_msg(scfg_t* cfg, user_t* user, int count);
-DLLEXPORT BOOL	DLLCALL user_sent_email(scfg_t* cfg, user_t* user, unsigned to_user, int count);
+DLLEXPORT BOOL	DLLCALL user_sent_email(scfg_t* cfg, user_t* user, int count, BOOL feedback);
 DLLEXPORT BOOL	DLLCALL user_downloaded(scfg_t* cfg, user_t* user, int files, long bytes);
 DLLEXPORT BOOL	DLLCALL user_uploaded(scfg_t* cfg, user_t* user, int files, long bytes);
-DLLEXPORT BOOL	DLLCALL user_credits_adjusted(scfg_t* cfg, user_t* user, long amount);
-DLLEXPORT BOOL	DLLCALL user_minutes_adjusted(scfg_t* cfg, user_t* user, long amount);
+DLLEXPORT BOOL	DLLCALL user_adjust_credits(scfg_t* cfg, user_t* user, long amount);
+DLLEXPORT BOOL	DLLCALL user_adjust_minutes(scfg_t* cfg, user_t* user, long amount);
 
 #ifdef __cplusplus
 }
-- 
GitLab