Fixed deleting messages, added menu item 206
This commit is contained in:
parent
6aacdea786
commit
827cbede63
@ -44,6 +44,7 @@ v0.37.01 14-Jan-2003.
|
|||||||
Removed charset conversion/translation.
|
Removed charset conversion/translation.
|
||||||
Added integer endian byteorder swapper, usefull for non-Intel
|
Added integer endian byteorder swapper, usefull for non-Intel
|
||||||
hardware.
|
hardware.
|
||||||
|
The poutCR function for the bbs never did send a newline.
|
||||||
|
|
||||||
mbtask:
|
mbtask:
|
||||||
Arcmail for non-CM nodes and Txx nodes is now sent during the
|
Arcmail for non-CM nodes and Txx nodes is now sent during the
|
||||||
@ -113,6 +114,10 @@ v0.37.01 14-Jan-2003.
|
|||||||
Maybe removed a bug where the bbs sometimes crashed during
|
Maybe removed a bug where the bbs sometimes crashed during
|
||||||
mail reading.
|
mail reading.
|
||||||
Fixed some minor things to the door.sys file.
|
Fixed some minor things to the door.sys file.
|
||||||
|
Normal users were allowed to delete messages of other users,
|
||||||
|
now only the writer or those with sysop access to the area are
|
||||||
|
allowed to delete messages.
|
||||||
|
Finally wrote Delete Message from the menu (menu 206).
|
||||||
|
|
||||||
examples:
|
examples:
|
||||||
The English and Dutch templates are updated to show the new
|
The English and Dutch templates are updated to show the new
|
||||||
@ -121,7 +126,8 @@ v0.37.01 14-Jan-2003.
|
|||||||
functions.
|
functions.
|
||||||
|
|
||||||
lang:
|
lang:
|
||||||
Changed english and dutch language prompts 11, 12, 13 and 107.
|
Changed english and dutch language prompts 11, 12, 13, 14 and
|
||||||
|
107.
|
||||||
Changed in other languages as well, but in English.
|
Changed in other languages as well, but in English.
|
||||||
|
|
||||||
|
|
||||||
|
4
TODO
4
TODO
@ -41,10 +41,6 @@ mbsebbs:
|
|||||||
|
|
||||||
L: ChangeHandle, allow own unix name as handle.
|
L: ChangeHandle, allow own unix name as handle.
|
||||||
|
|
||||||
N: Delete messages from the menu.
|
|
||||||
|
|
||||||
N: With delete message during reading there is no check.
|
|
||||||
|
|
||||||
newuser:
|
newuser:
|
||||||
L: Allow handles to be the same as the unixname.
|
L: Allow handles to be the same as the unixname.
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
</HEAD>
|
</HEAD>
|
||||||
<BODY>
|
<BODY>
|
||||||
<BLOCKQUOTE>
|
<BLOCKQUOTE>
|
||||||
<DIV align=right><h5>Last update 08-Feb-2003</h5></DIV>
|
<DIV align=right><h5>Last update 20-Feb-2003</h5></DIV>
|
||||||
<DIV align=center><h1>MBSE BBS Message Area Menus</h1></DIV>
|
<DIV align=center><h1>MBSE BBS Message Area Menus</h1></DIV>
|
||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
@ -53,7 +53,7 @@
|
|||||||
<P>
|
<P>
|
||||||
|
|
||||||
<LI value="206"><strong>Delete a Message:</strong> This option will let the
|
<LI value="206"><strong>Delete a Message:</strong> This option will let the
|
||||||
user delete a specific message. He must the the owner or recipient of that
|
user delete a specific message. He must the the owner of that
|
||||||
message or have sysop rights in that area to be able to delete a message.<br>
|
message or have sysop rights in that area to be able to delete a message.<br>
|
||||||
<strong>Optional data:</strong> None.<br>
|
<strong>Optional data:</strong> None.<br>
|
||||||
<P>
|
<P>
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
11 mail.c email.c HR|Export to (H)ome or (R)ules directory:
|
11 mail.c email.c HR|Export to (H)ome or (R)ules directory:
|
||||||
12 mail.c email.c |Message exported to rules directory as
|
12 mail.c email.c |Message exported to rules directory as
|
||||||
13 dispfile.c |No rules found for this area
|
13 dispfile.c |No rules found for this area
|
||||||
14 .c |
|
14 mail.c |You are not allowed to delete that message
|
||||||
15 .c |
|
15 .c |
|
||||||
16 .c |
|
16 .c |
|
||||||
17 .c |
|
17 .c |
|
||||||
@ -329,7 +329,7 @@
|
|||||||
328 bbslist.c | Date of Entry :
|
328 bbslist.c | Date of Entry :
|
||||||
329 bbslist.c | Entry Name :
|
329 bbslist.c | Entry Name :
|
||||||
330 bbslist.c |Delete BBS
|
330 bbslist.c |Delete BBS
|
||||||
331 bbslist.c oneline.c |Please enter number to delete:
|
331 bbslist.c oneline.c mail.c |Please enter number to delete:
|
||||||
332 bbslist.c oneline.c |Record
|
332 bbslist.c oneline.c |Record
|
||||||
333 bbslist.c oneline.c |does not belong to you.
|
333 bbslist.c oneline.c |does not belong to you.
|
||||||
334 bbslist.c oneline.c |already marked for deletion
|
334 bbslist.c oneline.c |already marked for deletion
|
||||||
|
@ -12,7 +12,7 @@ JN|Is Uw naam juist gespeld? [J/n]
|
|||||||
HR|Exporteer naar (H)ome of (R)egels directory:
|
HR|Exporteer naar (H)ome of (R)egels directory:
|
||||||
|Bericht geexporteerd naar rules directory als
|
|Bericht geexporteerd naar rules directory als
|
||||||
|Geen regels gevonden voor dit gebied
|
|Geen regels gevonden voor dit gebied
|
||||||
|Bytes op de rekening
|
|Je mag dit bericht niet verwijderen
|
||||||
|Tijd gestort vandaag
|
|Tijd gestort vandaag
|
||||||
|Bytes gestort vandaag
|
|Bytes gestort vandaag
|
||||||
|Tijd opgenomen vandaag
|
|Tijd opgenomen vandaag
|
||||||
|
@ -12,7 +12,7 @@ YN|Did you spell your name correctly? [Y/n]
|
|||||||
HR|Export to (H)ome or (R)ules directory:
|
HR|Export to (H)ome or (R)ules directory:
|
||||||
|Message exported to rules directory as
|
|Message exported to rules directory as
|
||||||
|No rules found for this area
|
|No rules found for this area
|
||||||
|Bytes in account
|
|You are not allowed to delete that message
|
||||||
|Time deposited today
|
|Time deposited today
|
||||||
|Bytes deposited today
|
|Bytes deposited today
|
||||||
|Time withdrawn today
|
|Time withdrawn today
|
||||||
|
@ -12,7 +12,7 @@ SN|
|
|||||||
HR|Export to (H)ome or (R)ules directory:
|
HR|Export to (H)ome or (R)ules directory:
|
||||||
|Message exported to rules directory as
|
|Message exported to rules directory as
|
||||||
|No rules found for this area
|
|No rules found for this area
|
||||||
|Bytes na cuenta :
|
|You are not allowed to delete that message
|
||||||
|Tempo depositado hoxe :
|
|Tempo depositado hoxe :
|
||||||
|Bytes depositados hoxe :
|
|Bytes depositados hoxe :
|
||||||
|Tempo retirado hoxe :
|
|Tempo retirado hoxe :
|
||||||
|
@ -12,7 +12,7 @@ JN|Haben Sie Ihren Namen korrekt eingegeben? [J/n]
|
|||||||
HR|Export to (H)ome or (R)ules directory:
|
HR|Export to (H)ome or (R)ules directory:
|
||||||
|Message exported to rules directory as
|
|Message exported to rules directory as
|
||||||
|No rules found for this area
|
|No rules found for this area
|
||||||
|Kontostand Daten (KBytes) . . . . :
|
|You are not allowed to delete that message
|
||||||
|Heute gesparte Zeit . . . . . . . :
|
|Heute gesparte Zeit . . . . . . . :
|
||||||
|Heute gesparte KBytes . . . . . . :
|
|Heute gesparte KBytes . . . . . . :
|
||||||
|Heute abgehobene Zeit . . . . . . :
|
|Heute abgehobene Zeit . . . . . . :
|
||||||
|
@ -12,7 +12,7 @@ SN|Hai scritto il tuo nome e cognome correttamente? [S/n]
|
|||||||
HR|Export to (H)ome or (R)ules directory:
|
HR|Export to (H)ome or (R)ules directory:
|
||||||
|Message exported to rules directory as
|
|Message exported to rules directory as
|
||||||
|No rules found for this area
|
|No rules found for this area
|
||||||
|Byte disponibili :
|
|You are not allowed to delete that message
|
||||||
|Tempo depositato oggi:
|
|Tempo depositato oggi:
|
||||||
|Byte depositati oggi :
|
|Byte depositati oggi :
|
||||||
|Tempo prelevato oggi :
|
|Tempo prelevato oggi :
|
||||||
|
@ -12,7 +12,7 @@ SN|
|
|||||||
HR|Export to (H)ome or (R)ules directory:
|
HR|Export to (H)ome or (R)ules directory:
|
||||||
|Message exported to rules directory as
|
|Message exported to rules directory as
|
||||||
|No rules found for this area
|
|No rules found for this area
|
||||||
|Bytes en la cuenta :
|
|You are not allowed to delete that message
|
||||||
|Tiempo depositado hoy :
|
|Tiempo depositado hoy :
|
||||||
|Bytes depositados hoy :
|
|Bytes depositados hoy :
|
||||||
|Tiempo retirado hoy :
|
|Tiempo retirado hoy :
|
||||||
|
@ -87,6 +87,7 @@ void poutCR(int fg, int bg, char *Str)
|
|||||||
{
|
{
|
||||||
colour(fg, bg);
|
colour(fg, bg);
|
||||||
fputs(Str, stdout);
|
fputs(Str, stdout);
|
||||||
|
fprintf(stdout, "\n");
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1180,14 +1180,19 @@ int ReadPanel()
|
|||||||
WhosDoingWhat(READ_POST);
|
WhosDoingWhat(READ_POST);
|
||||||
|
|
||||||
colour(WHITE, RED);
|
colour(WHITE, RED);
|
||||||
if (msgs.UsrDelete || exitinfo.Security.level >= CFG.sysop_access) {
|
/*
|
||||||
|
* The writer of the message, sysops, and who has sysop rights to the message area
|
||||||
|
* are allowed to delete messages.
|
||||||
|
*/
|
||||||
|
if ((msgs.UsrDelete && IsMe(Msg.From)) || (exitinfo.Security.level >= CFG.sysop_access) ||
|
||||||
|
Access(exitinfo.Security, msgs.SYSec)) {
|
||||||
/* (A)gain, (N)ext, (L)ast, (R)eply, (E)nter, (D)elete, (Q)uit, e(X)port */
|
/* (A)gain, (N)ext, (L)ast, (R)eply, (E)nter, (D)elete, (Q)uit, e(X)port */
|
||||||
printf("%s", (char *) Language(214));
|
printf("%s", (char *) Language(214));
|
||||||
} else {
|
} else {
|
||||||
/* (A)gain, (N)ext, (L)ast, (R)eply, (E)nter, (Q)uit, e(X)port */
|
/* (A)gain, (N)ext, (L)ast, (R)eply, (E)nter, (Q)uit, e(X)port */
|
||||||
printf("%s", (char *) Language(215));
|
printf("%s", (char *) Language(215));
|
||||||
}
|
}
|
||||||
if (exitinfo.Security.level >= CFG.sysop_access)
|
if ((exitinfo.Security.level >= CFG.sysop_access) || Access(exitinfo.Security, msgs.SYSec))
|
||||||
printf(", (!)");
|
printf(", (!)");
|
||||||
|
|
||||||
printf(": ");
|
printf(": ");
|
||||||
@ -1196,14 +1201,15 @@ int ReadPanel()
|
|||||||
alarm_on();
|
alarm_on();
|
||||||
input = toupper(Getone());
|
input = toupper(Getone());
|
||||||
|
|
||||||
if (input == '!') {
|
if (input == '!') { /* ! Toggle kludges display */
|
||||||
if (exitinfo.Security.level >= CFG.sysop_access) {
|
if ((exitinfo.Security.level >= CFG.sysop_access) || Access(exitinfo.Security, msgs.SYSec)) {
|
||||||
if (Kludges)
|
if (Kludges)
|
||||||
Kludges = FALSE;
|
Kludges = FALSE;
|
||||||
else
|
else
|
||||||
Kludges = TRUE;
|
Kludges = TRUE;
|
||||||
}
|
}
|
||||||
Read_a_Msg(LastNum, TRUE);
|
Read_a_Msg(LastNum, TRUE);
|
||||||
|
|
||||||
} else if (input == Keystroke(214, 0)) { /* (A)gain */
|
} else if (input == Keystroke(214, 0)) { /* (A)gain */
|
||||||
Read_a_Msg(LastNum, TRUE);
|
Read_a_Msg(LastNum, TRUE);
|
||||||
|
|
||||||
@ -1240,6 +1246,8 @@ int ReadPanel()
|
|||||||
Read_a_Msg(LastNum, TRUE);
|
Read_a_Msg(LastNum, TRUE);
|
||||||
|
|
||||||
} else if (input == Keystroke(214, 6)) { /* (D)elete */
|
} else if (input == Keystroke(214, 6)) { /* (D)elete */
|
||||||
|
if ((msgs.UsrDelete && IsMe(Msg.From)) || (exitinfo.Security.level >= CFG.sysop_access) ||
|
||||||
|
Access(exitinfo.Security, msgs.SYSec)) {
|
||||||
Delete_MsgNum(LastNum);
|
Delete_MsgNum(LastNum);
|
||||||
if (LastNum < MsgBase.Highest) {
|
if (LastNum < MsgBase.Highest) {
|
||||||
LastNum++;
|
LastNum++;
|
||||||
@ -1247,6 +1255,10 @@ int ReadPanel()
|
|||||||
} else {
|
} else {
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
Read_a_Msg(LastNum, TRUE);
|
||||||
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
/* Next */
|
/* Next */
|
||||||
pout(WHITE, BLACK, (char *) Language(216));
|
pout(WHITE, BLACK, (char *) Language(216));
|
||||||
@ -1543,6 +1555,66 @@ void QuickScan_Msgs()
|
|||||||
*/
|
*/
|
||||||
void Delete_Msg()
|
void Delete_Msg()
|
||||||
{
|
{
|
||||||
|
char *temp;
|
||||||
|
unsigned long Msgnum = 0L;
|
||||||
|
|
||||||
|
WhosDoingWhat(READ_POST);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* The area data is already set, so we can do the next things
|
||||||
|
*/
|
||||||
|
if (MsgBase.Total == 0) {
|
||||||
|
colour(WHITE, BLACK);
|
||||||
|
/* There are no messages in this area */
|
||||||
|
printf("\n%s\n\n", (char *) Language(205));
|
||||||
|
sleep(3);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
colour(CFG.TextColourF, CFG.TextColourB);
|
||||||
|
/* Message area \"%s\" contains %lu messages. */
|
||||||
|
printf("\n%s\"%s\" %s%lu %s", (char *) Language(221), sMsgAreaDesc,
|
||||||
|
(char *) Language(222), MsgBase.Total, (char *) Language(223));
|
||||||
|
|
||||||
|
colour(WHITE, BLACK);
|
||||||
|
/* Please enter a message between */
|
||||||
|
printf("\n%s(%lu - %lu): ", (char *) Language(224), MsgBase.Lowest, MsgBase.Highest);
|
||||||
|
|
||||||
|
temp = calloc(81, sizeof(char));
|
||||||
|
colour(CFG.InputColourF, CFG.InputColourB);
|
||||||
|
GetstrC(temp, 10);
|
||||||
|
if ((strcmp(temp, "")) != 0)
|
||||||
|
Msgnum = atoi(temp);
|
||||||
|
free(temp);
|
||||||
|
|
||||||
|
if (!Msg_Open(sMsgAreaBase)) {
|
||||||
|
WriteError("Error open JAM base %s", sMsgAreaBase);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!Msg_ReadHeader(Msgnum)) {
|
||||||
|
perror("");
|
||||||
|
colour(WHITE, BLACK);
|
||||||
|
/* Message doesn't exist */
|
||||||
|
printf("\n%s\n\n", (char *)Language(77));
|
||||||
|
Msg_Close();
|
||||||
|
sleep(3);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
Msg_Close();
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Message does exist and a valid number is suplied, check and finally mark the message deleted.
|
||||||
|
*/
|
||||||
|
if ((msgs.UsrDelete && IsMe(Msg.From)) || (exitinfo.Security.level >= CFG.sysop_access) ||
|
||||||
|
Access(exitinfo.Security, msgs.SYSec)) {
|
||||||
|
Delete_MsgNum(Msgnum);
|
||||||
|
} else {
|
||||||
|
colour(LIGHTRED, BLACK);
|
||||||
|
printf("\n%s\n\n", (char *)Language(14));
|
||||||
|
}
|
||||||
|
|
||||||
|
sleep(3);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1933,13 +2005,11 @@ void MsgArea_List(char *Option)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Function deletes a specified message.
|
|
||||||
*/
|
|
||||||
void Delete_MsgNum(unsigned long MsgNum)
|
void Delete_MsgNum(unsigned long MsgNum)
|
||||||
{
|
{
|
||||||
int Result = FALSE;
|
int Result = FALSE;
|
||||||
|
|
||||||
|
/* Deleting message */
|
||||||
pout(LIGHTRED, BLACK, (char *) Language(230));
|
pout(LIGHTRED, BLACK, (char *) Language(230));
|
||||||
|
|
||||||
if (Msg_Open(sMsgAreaBase)) {
|
if (Msg_Open(sMsgAreaBase)) {
|
||||||
|
Reference in New Issue
Block a user