Commit 5a1e036c authored by rswindell's avatar rswindell
Browse files

Change the thread down/up by thread-ID command keys to ( and )

Display the "No messages found" text when attempting to thread up or down
and there is no corresponding message.
parent 906e096a
......@@ -587,8 +587,10 @@ void sbbs_t::readmail(uint usernumber, int which)
break;
if(u<smb.msgs)
smb.curmsg=u;
else
else {
domsg=0;
bputs(text[NoMessagesFound]);
}
break;
case '<': /* Search Title backward */
for(i=smb.curmsg-1;i>-1;i--)
......@@ -596,8 +598,10 @@ void sbbs_t::readmail(uint usernumber, int which)
break;
if(i>-1)
smb.curmsg=i;
else
else {
domsg=0;
bputs(text[NoMessagesFound]);
}
break;
case '}': /* Search Author forward */
strcpy(str,msg.from);
......@@ -606,8 +610,10 @@ void sbbs_t::readmail(uint usernumber, int which)
break;
if(u<smb.msgs)
smb.curmsg=u;
else
else {
domsg=0;
bputs(text[NoMessagesFound]);
}
break;
case 'N': /* Got to next un-read message */
for(u=smb.curmsg+1;u<smb.msgs;u++)
......@@ -615,8 +621,10 @@ void sbbs_t::readmail(uint usernumber, int which)
break;
if(u<smb.msgs)
smb.curmsg=u;
else
else {
domsg=0;
bputs(text[NoMessagesFound]);
}
break;
case '{': /* Search Author backward */
strcpy(str,msg.from);
......@@ -628,6 +636,7 @@ void sbbs_t::readmail(uint usernumber, int which)
}
if(u==0) {
domsg=0;
bputs(text[NoMessagesFound]);
break;
}
}
......@@ -640,8 +649,10 @@ void sbbs_t::readmail(uint usernumber, int which)
break;
if(u<smb.msgs)
smb.curmsg=u;
else
else {
domsg=0;
bputs(text[NoMessagesFound]);
}
break;
case '[': /* Search To User backward */
strcpy(str,msg.to);
......@@ -653,6 +664,7 @@ void sbbs_t::readmail(uint usernumber, int which)
}
if(u==0) {
domsg=0;
bputs(text[NoMessagesFound]);
break;
}
}
......
......@@ -718,7 +718,7 @@ int sbbs_t::scanposts(uint subnum, long mode, const char *find)
bprintf(text[UnvalidatedWarning],unvalidated+1);
bprintf(text[ReadingSub],ugrp,cfg.grp[cfg.sub[subnum]->grp]->sname
,usub,cfg.sub[subnum]->sname,smb.curmsg+1,smb.msgs);
sprintf(str,"ABCDEFILMNPQRTUY?<>[]{}-+.,");
sprintf(str,"ABCDEFILMNPQRTUY?<>[]{}-+()");
if(sub_op(subnum))
strcat(str,"O");
do_find=true;
......@@ -1090,11 +1090,12 @@ int sbbs_t::scanposts(uint subnum, long mode, const char *find)
break;
}
break;
case '.': /* Thread forward */
case ')': /* Thread forward */
l=msg.hdr.thread_first;
if(!l) l=msg.hdr.thread_next;
if(!l) {
domsg=0;
bputs(text[NoMessagesFound]);
break;
}
for(u=0;u<smb.msgs;u++)
......@@ -1102,11 +1103,16 @@ int sbbs_t::scanposts(uint subnum, long mode, const char *find)
break;
if(u<smb.msgs)
smb.curmsg=u;
else {
domsg=0;
bputs(text[NoMessagesFound]);
}
do_find=false;
break;
case ',': /* Thread backwards */
case '(': /* Thread backwards */
if(!msg.hdr.thread_back) {
domsg=0;
bputs(text[NoMessagesFound]);
break;
}
for(u=0;u<smb.msgs;u++)
......@@ -1114,6 +1120,10 @@ int sbbs_t::scanposts(uint subnum, long mode, const char *find)
break;
if(u<smb.msgs)
smb.curmsg=u;
else {
domsg=0;
bputs(text[NoMessagesFound]);
}
do_find=false;
break;
case '>': /* Search Title forward */
......@@ -1122,8 +1132,10 @@ int sbbs_t::scanposts(uint subnum, long mode, const char *find)
break;
if(u<smb.msgs)
smb.curmsg=u;
else
else {
domsg=0;
bputs(text[NoMessagesFound]);
}
do_find=false;
break;
case '<': /* Search Title backward */
......@@ -1132,8 +1144,10 @@ int sbbs_t::scanposts(uint subnum, long mode, const char *find)
break;
if(i>-1)
smb.curmsg=i;
else
else {
domsg=0;
bputs(text[NoMessagesFound]);
}
do_find=false;
break;
case '}': /* Search Author forward */
......@@ -1143,8 +1157,10 @@ int sbbs_t::scanposts(uint subnum, long mode, const char *find)
break;
if(u<smb.msgs)
smb.curmsg=u;
else
else {
domsg=0;
bputs(text[NoMessagesFound]);
}
do_find=false;
break;
case '{': /* Search Author backward */
......@@ -1154,8 +1170,10 @@ int sbbs_t::scanposts(uint subnum, long mode, const char *find)
break;
if(i>-1)
smb.curmsg=i;
else
else {
domsg=0;
bputs(text[NoMessagesFound]);
}
do_find=false;
break;
case ']': /* Search To User forward */
......@@ -1165,8 +1183,10 @@ int sbbs_t::scanposts(uint subnum, long mode, const char *find)
break;
if(u<smb.msgs)
smb.curmsg=u;
else
else {
domsg=0;
bputs(text[NoMessagesFound]);
}
do_find=false;
break;
case '[': /* Search To User backward */
......@@ -1176,8 +1196,10 @@ int sbbs_t::scanposts(uint subnum, long mode, const char *find)
break;
if(i>-1)
smb.curmsg=i;
else
else {
domsg=0;
bputs(text[NoMessagesFound]);
}
do_find=false;
break;
case 0: /* Carriage return - Next Message */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment