summaryrefslogtreecommitdiff
path: root/BBSHTMLConfig.c
diff options
context:
space:
mode:
authorDave Hibberd <hibby@debian.org>2025-07-22 20:56:59 +0100
committerDave Hibberd <hibby@debian.org>2025-07-22 20:56:59 +0100
commit1f40ff4a07793ecfa679a1384053451c4f3f536f (patch)
treec0813999c7216f98b4ac66224bd01589baee84d1 /BBSHTMLConfig.c
parentb128f2a43a16acef50de045ae6526772c04c395e (diff)
New upstream version 6.0.24.77+repackupstream/6.0.24.77+repack
Diffstat (limited to 'BBSHTMLConfig.c')
-rw-r--r--BBSHTMLConfig.c30
1 files changed, 24 insertions, 6 deletions
diff --git a/BBSHTMLConfig.c b/BBSHTMLConfig.c
index 6207298..027c786 100644
--- a/BBSHTMLConfig.c
+++ b/BBSHTMLConfig.c
@@ -117,6 +117,7 @@ struct UserInfo * FindBBS(char * Name);
void ReleaseWebMailStruct(WebMailInfo * WebMail);
VOID TidyWelcomeMsg(char ** pPrompt);
int MailAPIProcessHTTPMessage(struct HTTPConnectionInfo * Session, char * response, char * Method, char * URL, char * request, BOOL LOCAL, char * Param, char * Token);
+void UndoTransparency(char * input);
char UNC[] = "";
char CHKD[] = "checked=checked ";
@@ -186,7 +187,7 @@ char RefreshMainPage[] = "<html><head>"
char StatusPage [] =
"<form style=\"font-family: monospace; text-align: center\" method=post action=/Mail/DisSession?%s>"
-"<br>User&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Callsign&nbsp;&nbsp; Stream Queue<br>"
+"<br>User&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Callsign&nbsp;&nbsp; Stream &nbsp;Queue &nbsp;Sent &nbsp;Rxed<br>"
"<select style=\"font-family: monospace;\" tabindex=1 size=10 name=call>";
char StreamEnd[] =
@@ -1701,6 +1702,8 @@ VOID ProcessConfUpdate(struct HTTPConnectionInfo * Session, char * MsgPtr, char
free(Filters);
Filters = NULL;
+ UndoTransparency(input);
+
while (input)
{
// extract and validate before saving
@@ -1714,7 +1717,7 @@ VOID ProcessConfUpdate(struct HTTPConnectionInfo * Session, char * MsgPtr, char
input = strstr(input, "&Type=");
- if (Filter.Action == 'H' || Filter.Action == 'R')
+ if (Filter.Action == 'H' || Filter.Action == 'R' || Filter.Action == 'A')
{
Filter.Type = toupper(input[6]);
input = strstr(input, "&From=");
@@ -2755,6 +2758,19 @@ VOID SendUIPage(char * Reply, int * ReplyLen, char * Key)
*ReplyLen = Len;
}
+void ConvertSpaceTonbsp(char * msg)
+{
+ // Replace any space with &nbsp;
+
+ char * ptr;
+
+ while (ptr = strchr(msg, ' '))
+ {
+ memmove(ptr + 5, ptr, strlen(ptr) + 1);
+ memcpy(ptr, "&nbsp;", 6);
+ }
+}
+
VOID SendStatusPage(char * Reply, int * ReplyLen, char * Key)
{
int Len;
@@ -2777,6 +2793,8 @@ VOID SendStatusPage(char * Reply, int * ReplyLen, char * Key)
{
strcpy(msg,"Idle&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"
"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"
+ "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"
+ "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"
"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\r\n");
}
else
@@ -2789,16 +2807,16 @@ VOID SendStatusPage(char * Reply, int * ReplyLen, char * Key)
strcpy(Name, conn->UserPointer->Name);
Name[9] = 0;
- i=sprintf_s(msg, sizeof(msg), "%s%s%s%s%2d&nbsp;%5d\r\n",
+ i=sprintf_s(msg, sizeof(msg), "%-12s %-9s %3d %6d%6d%6d\r\n",
Name,
- &TenSpaces[strlen(Name) * 6],
conn->UserPointer->Call,
- &TenSpaces[strlen(conn->UserPointer->Call) * 6],
conn->BPQStream,
- conn->OutputQueueLength - conn->OutputGetPointer);
+ conn->OutputQueueLength - conn->OutputGetPointer, conn->bytesSent, conn->bytesRxed);
}
}
}
+
+ ConvertSpaceTonbsp(msg);
Len += sprintf(&Reply[Len], StatusLine, conn->BPQStream, msg);
}