diff --git a/src/sbbs3/bat_xfer.cpp b/src/sbbs3/bat_xfer.cpp index 830fd4ea3518cff2711771a1289c40b6d3f032ca..edf10d86b88ebce97a9719ecb9824a0b72fc231b 100644 --- a/src/sbbs3/bat_xfer.cpp +++ b/src/sbbs3/bat_xfer.cpp @@ -44,6 +44,7 @@ void sbbs_t::batchmenu() { char str[129],tmp2[250],done=0,ch; char tmp[512]; + char keys[32]; uint i,n,xfrprot,xfrdir; ulong totalcdt,totalsize,totaltime; time_t start,end; @@ -70,19 +71,20 @@ void sbbs_t::batchmenu() } ASYNC; bputs(text[BatchMenuPrompt]); - ch=(char)getkeys("BCDLQRU?\r",0); + sprintf(keys,"BCDLRU?\r%c", text[YNQP][2]); + ch=(char)getkeys(keys,0); if(ch>' ') logch(ch,0); + if(ch==text[YNQP][2] || ch=='\r') { /* Quit */ + lncntr=0; + done=1; + break; + } switch(ch) { case '?': if(useron.misc&(EXPERT|RIP|WIP|HTML)) menu("batchxfr"); break; - case CR: - case 'Q': - lncntr=0; - done=1; - break; case 'B': /* Bi-directional transfers */ if(useron.rest&FLAG('D')) { bputs(text[R_Download]); @@ -120,7 +122,7 @@ void sbbs_t::batchmenu() xfer_prot_menu(XFER_BIDIR); SYNC; mnemonics(text[ProtocolOrQuit]); - strcpy(tmp2,"Q"); + sprintf(tmp2,"%c",text[YNQP][2]); for(i=0;i<cfg.total_prots;i++) if(cfg.prot[i]->bicmd[0] && chk_ar(cfg.prot[i]->ar,&useron,&client)) { sprintf(tmp,"%c",cfg.prot[i]->mnemonic); @@ -128,7 +130,7 @@ void sbbs_t::batchmenu() } ungetkey(useron.prot); ch=(char)getkeys(tmp2,0); - if(ch=='Q') + if(ch==text[YNQP][2]) break; for(i=0;i<cfg.total_prots;i++) if(cfg.prot[i]->bicmd[0] && cfg.prot[i]->mnemonic==ch @@ -293,14 +295,14 @@ void sbbs_t::batchmenu() break; ASYNC; mnemonics(text[ProtocolOrQuit]); - strcpy(str,"Q"); + sprintf(str,"%c",text[YNQP][2]); for(i=0;i<cfg.total_prots;i++) if(cfg.prot[i]->batulcmd[0] && chk_ar(cfg.prot[i]->ar,&useron,&client)) { sprintf(tmp,"%c",cfg.prot[i]->mnemonic); strcat(str,tmp); } ch=(char)getkeys(str,0); - if(ch=='Q') + if(ch==text[YNQP][2]) break; for(i=0;i<cfg.total_prots;i++) if(cfg.prot[i]->batulcmd[0] && cfg.prot[i]->mnemonic==ch @@ -381,7 +383,7 @@ BOOL sbbs_t::start_batch_download() xfer_prot_menu(XFER_BATCH_DOWNLOAD); ASYNC; mnemonics(text[ProtocolOrQuit]); - strcpy(str,"Q"); + sprintf(str,"%c",text[YNQP][2]); for(i=0;i<cfg.total_prots;i++) if(cfg.prot[i]->batdlcmd[0] && chk_ar(cfg.prot[i]->ar,&useron,&client)) { sprintf(tmp,"%c",cfg.prot[i]->mnemonic); @@ -389,7 +391,7 @@ BOOL sbbs_t::start_batch_download() } ungetkey(useron.prot); ch=(char)getkeys(str,0); - if(ch=='Q' || sys_status&SS_ABORT) + if(ch==text[YNQP][2] || sys_status&SS_ABORT) return(FALSE); for(i=0;i<cfg.total_prots;i++) if(cfg.prot[i]->batdlcmd[0] && cfg.prot[i]->mnemonic==ch diff --git a/src/sbbs3/con_out.cpp b/src/sbbs3/con_out.cpp index 6ff77a8d702ff50a335b9a81b913cddfde60e26b..7d096977581a3d304a237cd39523dde3b1b8104c 100644 --- a/src/sbbs3/con_out.cpp +++ b/src/sbbs3/con_out.cpp @@ -8,7 +8,7 @@ * @format.tab-size 4 (Plain Text/Source Code File Header) * * @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) * * * - * Copyright 2011 Rob Swindell - http://www.synchro.net/copyright.html * + * Copyright 2015 Rob Swindell - http://www.synchro.net/copyright.html * * * * This program is free software; you can redistribute it and/or * * modify it under the terms of the GNU General Public License * @@ -211,8 +211,8 @@ void sbbs_t::outchar(char ch) if(online==ON_REMOTE && console&CON_R_ECHO) { if(console&CON_R_ECHOX && (uchar)ch>=' ' && !outchar_esc) { - ch=text[YN][3]; - if(text[YN][2]==0 || ch==0) ch='X'; + ch=text[YNQP][3]; + if(text[YNQP][2]==0 || ch==0) ch='X'; } if(ch==FF && term_supports(ANSI)) { putcom("\x1b[2J\x1b[H"); /* clear screen, home cursor */ diff --git a/src/sbbs3/data.cpp b/src/sbbs3/data.cpp index 1ab30d5773f220ead5acdac7a2e622b671d9bcc9..00695365370cf87bc7826b147cb4c6f572cb7658 100644 --- a/src/sbbs3/data.cpp +++ b/src/sbbs3/data.cpp @@ -8,7 +8,7 @@ * @format.tab-size 4 (Plain Text/Source Code File Header) * * @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) * * * - * Copyright 2011 Rob Swindell - http://www.synchro.net/copyright.html * + * Copyright 2015 Rob Swindell - http://www.synchro.net/copyright.html * * * * This program is free software; you can redistribute it and/or * * modify it under the terms of the GNU General Public License * @@ -69,9 +69,7 @@ uint sbbs_t::finduser(char *instr) errormsg(WHERE,ERR_OPEN,str3,O_RDONLY); return(0); } - SAFEPRINTF(ynq,"%.2s",text[YN]); - ynq[2]='Q'; - ynq[3]=0; + SAFEPRINTF(ynq,"%.3s",text[YNQP]); length=(long)filelength(file); while(pass<3) { fseek(stream,0L,SEEK_SET); /* seek to beginning for each pass */ @@ -97,11 +95,11 @@ uint sbbs_t::finduser(char *instr) fclose(stream); return(0); } - if(c==text[YN][0]) { + if(c==text[YNQP][0]) { fclose(stream); return((l/(LEN_ALIAS+2))+1); } - if(c=='Q') { + if(c==text[YNQP][2]) { fclose(stream); return(0); } diff --git a/src/sbbs3/download.cpp b/src/sbbs3/download.cpp index b76db1662b3ac20eacea3afb795067effe06f1b6..5fe94c231e8c7423a4991eaaa9f13d05e0ffb414 100644 --- a/src/sbbs3/download.cpp +++ b/src/sbbs3/download.cpp @@ -8,7 +8,7 @@ * @format.tab-size 4 (Plain Text/Source Code File Header) * * @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) * * * - * Copyright 2011 Rob Swindell - http://www.synchro.net/copyright.html * + * Copyright 2015 Rob Swindell - http://www.synchro.net/copyright.html * * * * This program is free software; you can redistribute it and/or * * modify it under the terms of the GNU General Public License * @@ -462,14 +462,14 @@ bool sbbs_t::sendfile(char* fname, char prot) else { xfer_prot_menu(XFER_DOWNLOAD); mnemonics(text[ProtocolOrQuit]); - strcpy(keys,"Q"); + sprintf(keys,"%c",text[YNQP][2]); for(i=0;i<cfg.total_prots;i++) if(cfg.prot[i]->dlcmd[0] && chk_ar(cfg.prot[i]->ar,&useron,&client)) sprintf(keys+strlen(keys),"%c",cfg.prot[i]->mnemonic); ch=(char)getkeys(keys,0); - if(ch=='Q' || sys_status&SS_ABORT) + if(ch==text[YNQP][2] || sys_status&SS_ABORT) return(false); } for(i=0;i<cfg.total_prots;i++) diff --git a/src/sbbs3/email.cpp b/src/sbbs3/email.cpp index a44f79d254a931ce96e26a63cfdccb8e1a1fde8e..fab6d0c31b4d38ff6b98fa8534e50ab51335c527 100644 --- a/src/sbbs3/email.cpp +++ b/src/sbbs3/email.cpp @@ -8,7 +8,7 @@ * @format.tab-size 4 (Plain Text/Source Code File Header) * * @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) * * * - * Copyright 2012 Rob Swindell - http://www.synchro.net/copyright.html * + * Copyright 2015 Rob Swindell - http://www.synchro.net/copyright.html * * * * This program is free software; you can redistribute it and/or * * modify it under the terms of the GNU General Public License * @@ -136,14 +136,14 @@ bool sbbs_t::email(int usernumber, const char *top, const char *subj, long mode) { /* Remote */ xfer_prot_menu(XFER_UPLOAD); mnemonics(text[ProtocolOrQuit]); - strcpy(str,"Q"); + sprintf(str,"%c",text[YNQP][2]); for(x=0;x<cfg.total_prots;x++) if(cfg.prot[x]->ulcmd[0] && chk_ar(cfg.prot[x]->ar,&useron,&client)) { sprintf(tmp,"%c",cfg.prot[x]->mnemonic); strcat(str,tmp); } ch=(char)getkeys(str,0); - if(ch=='Q' || sys_status&SS_ABORT) { + if(ch==text[YNQP][2] || sys_status&SS_ABORT) { bputs(text[Aborted]); remove(msgpath); return(false); diff --git a/src/sbbs3/fido.cpp b/src/sbbs3/fido.cpp index 07d470f523031794fb2e948f91c6eff7182add80..a0f9cce020f5b00307b061e1a2cbf9a2130da0af 100644 --- a/src/sbbs3/fido.cpp +++ b/src/sbbs3/fido.cpp @@ -8,7 +8,7 @@ * @format.tab-size 4 (Plain Text/Source Code File Header) * * @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) * * * - * Copyright 2011 Rob Swindell - http://www.synchro.net/copyright.html * + * Copyright 2015 Rob Swindell - http://www.synchro.net/copyright.html * * * * This program is free software; you can redistribute it and/or * * modify it under the terms of the GNU General Public License * @@ -237,14 +237,14 @@ bool sbbs_t::netmail(const char *into, const char *title, long mode) { /* Remote */ xfer_prot_menu(XFER_UPLOAD); mnemonics(text[ProtocolOrQuit]); - strcpy(str,"Q"); + sprintf(str,"%c",text[YNQP][2]); for(x=0;x<cfg.total_prots;x++) if(cfg.prot[x]->ulcmd[0] && chk_ar(cfg.prot[x]->ar,&useron,&client)) { sprintf(tmp,"%c",cfg.prot[x]->mnemonic); strcat(str,tmp); } ch=(char)getkeys(str,0); - if(ch=='Q' || sys_status&SS_ABORT) { + if(ch==text[YNQP][2] || sys_status&SS_ABORT) { bputs(text[Aborted]); return(false); } diff --git a/src/sbbs3/getkey.cpp b/src/sbbs3/getkey.cpp index 49ab1f0b6932fd00abfd04527da31f24b2276398..036ff2fb88375b818af684086e7469947bf5bce6 100644 --- a/src/sbbs3/getkey.cpp +++ b/src/sbbs3/getkey.cpp @@ -8,7 +8,7 @@ * @format.tab-size 4 (Plain Text/Source Code File Header) * * @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) * * * - * Copyright 2009 Rob Swindell - http://www.synchro.net/copyright.html * + * Copyright 2015 Rob Swindell - http://www.synchro.net/copyright.html * * * * This program is free software; you can redistribute it and/or * * modify it under the terms of the GNU General Public License * @@ -363,16 +363,16 @@ bool sbbs_t::yesno(const char *str) bprintf(text[YesNoQuestion],str); while(online) { if(sys_status&SS_ABORT) - ch=text[YN][1]; + ch=text[YNQP][1]; else ch=getkey(K_UPPER|K_COLD); - if(ch==text[YN][0] || ch==CR) { + if(ch==text[YNQP][0] || ch==CR) { if(bputs(text[Yes])) CRLF; lncntr=0; return(true); } - if(ch==text[YN][1]) { + if(ch==text[YNQP][1]) { if(bputs(text[No])) CRLF; lncntr=0; @@ -396,16 +396,16 @@ bool sbbs_t::noyes(const char *str) bprintf(text[NoYesQuestion],str); while(online) { if(sys_status&SS_ABORT) - ch=text[YN][1]; + ch=text[YNQP][1]; else ch=getkey(K_UPPER|K_COLD); - if(ch==text[YN][1] || ch==CR) { + if(ch==text[YNQP][1] || ch==CR) { if(bputs(text[No])) CRLF; lncntr=0; return(true); } - if(ch==text[YN][0]) { + if(ch==text[YNQP][0]) { if(bputs(text[Yes])) CRLF; lncntr=0; @@ -511,7 +511,7 @@ void sbbs_t::pause() && !(cfg.node_misc&NM_NOPAUSESPIN)) l|=K_SPIN; ch=getkey(l); - if(ch==text[YN][1] || ch=='Q') + if(ch==text[YNQP][1] || ch==text[YNQP][2]) sys_status|=SS_ABORT; else if(ch==LF) // down arrow == display one more line lncntr=rows-2; diff --git a/src/sbbs3/getstr.cpp b/src/sbbs3/getstr.cpp index 1188f73d3722f14e596ff35a08768b8d9c91bc25..afc43a10c297206064da93df6715c9b8f65fcd60 100644 --- a/src/sbbs3/getstr.cpp +++ b/src/sbbs3/getstr.cpp @@ -8,7 +8,7 @@ * @format.tab-size 4 (Plain Text/Source Code File Header) * * @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) * * * - * Copyright 2014 Rob Swindell - http://www.synchro.net/copyright.html * + * Copyright 2015 Rob Swindell - http://www.synchro.net/copyright.html * * * * This program is free software; you can redistribute it and/or * * modify it under the terms of the GNU General Public License * @@ -573,7 +573,7 @@ size_t sbbs_t::getstr(char *strout, size_t maxlen, long mode) /****************************************************************************/ /* Hot keyed number input routine. */ /* Returns a valid number between 1 and max, 0 if no number entered, or -1 */ -/* if the user hit 'Q' or ctrl-c */ +/* if the user hit the quit key (e.g. 'Q') or ctrl-c */ /****************************************************************************/ long sbbs_t::getnum(ulong max, ulong dflt) { @@ -584,8 +584,8 @@ long sbbs_t::getnum(ulong max, ulong dflt) ch=getkey(K_UPPER); if(ch>0x7f) continue; - if(ch=='Q') { - outchar('Q'); + if(ch==text[YNQP][2]) { + outchar(text[YNQP][2]); if(useron.misc&COLDKEYS) ch=getkey(K_UPPER); if(ch==BS || ch==DEL) { diff --git a/src/sbbs3/listfile.cpp b/src/sbbs3/listfile.cpp index 73b4e9684fa19c8647d24d8c2fdc2e4a6a9ebb36..da5441e35cde4e32c1203e7e4d4d3c8514e4a181 100644 --- a/src/sbbs3/listfile.cpp +++ b/src/sbbs3/listfile.cpp @@ -8,7 +8,7 @@ * @format.tab-size 4 (Plain Text/Source Code File Header) * * @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) * * * - * Copyright 2011 Rob Swindell - http://www.synchro.net/copyright.html * + * Copyright 2015 Rob Swindell - http://www.synchro.net/copyright.html * * * * This program is free software; you can redistribute it and/or * * modify it under the terms of the GNU General Public License * @@ -689,7 +689,7 @@ int sbbs_t::batchflagprompt(uint dirnum, file_t* bf, uint total pause(); return(2); } - if(ch=='Q' || sys_status&SS_ABORT) + if(ch==text[YNQP][2] || sys_status&SS_ABORT) return(-1); if(ch=='S') return(0); @@ -1352,7 +1352,7 @@ int sbbs_t::listfileinfo(uint dirnum, char *filespec, long mode) openfile(&f); SYNC; mnemonics(text[ProtocolBatchQuitOrNext]); - strcpy(str,"BQ\r"); + sprintf(str,"B%c\r",text[YNQP][2]); for(i=0;i<cfg.total_prots;i++) if(cfg.prot[i]->dlcmd[0] && chk_ar(cfg.prot[i]->ar,&useron,&client)) { @@ -1361,7 +1361,7 @@ int sbbs_t::listfileinfo(uint dirnum, char *filespec, long mode) } // ungetkey(useron.prot); ch=(char)getkeys(str,0); - if(ch=='Q') { + if(ch==text[YNQP][2]) { found=-1; done=1; } diff --git a/src/sbbs3/netmail.cpp b/src/sbbs3/netmail.cpp index 62aadbb2484272a7cd8143acab39482f86b3cc29..173f4dbde0f161180fa3c1d7fa44b2b4cb27c3dc 100644 --- a/src/sbbs3/netmail.cpp +++ b/src/sbbs3/netmail.cpp @@ -8,7 +8,7 @@ * @format.tab-size 4 (Plain Text/Source Code File Header) * * @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) * * * - * Copyright 2011 Rob Swindell - http://www.synchro.net/copyright.html * + * Copyright 2015 Rob Swindell - http://www.synchro.net/copyright.html * * * * This program is free software; you can redistribute it and/or * * modify it under the terms of the GNU General Public License * @@ -114,14 +114,14 @@ bool sbbs_t::inetmail(const char *into, const char *subj, long mode) { /* Remote */ xfer_prot_menu(XFER_UPLOAD); mnemonics(text[ProtocolOrQuit]); - strcpy(str,"Q"); + sprintf(str,"%c",text[YNQP][2]); for(x=0;x<cfg.total_prots;x++) if(cfg.prot[x]->ulcmd[0] && chk_ar(cfg.prot[x]->ar,&useron,&client)) { sprintf(tmp,"%c",cfg.prot[x]->mnemonic); strcat(str,tmp); } ch=(char)getkeys(str,0); - if(ch=='Q' || sys_status&SS_ABORT) { + if(ch==text[YNQP][2] || sys_status&SS_ABORT) { bputs(text[Aborted]); remove(msgpath); return(false); diff --git a/src/sbbs3/qwk.cpp b/src/sbbs3/qwk.cpp index 403212394be66ecbe6895f523984d24832d79db3..d5163738d55c7498a24b61002039e85585a9cb05 100644 --- a/src/sbbs3/qwk.cpp +++ b/src/sbbs3/qwk.cpp @@ -8,7 +8,7 @@ * @format.tab-size 4 (Plain Text/Source Code File Header) * * @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) * * * - * Copyright 2012 Rob Swindell - http://www.synchro.net/copyright.html * + * Copyright 2015 Rob Swindell - http://www.synchro.net/copyright.html * * * * This program is free software; you can redistribute it and/or * * modify it under the terms of the GNU General Public License * @@ -419,13 +419,13 @@ void sbbs_t::qwk_sec() action=NODE_TQWK; ASYNC; bputs(text[QWKPrompt]); - strcpy(str,"?UDCSPQ\r"); + sprintf(str,"?UDCSP\r%c",text[YNQP][2]); if(bi) strcat(str,"B"); ch=(char)getkeys(str,0); if(ch>' ') logch(ch,0); - if(sys_status&SS_ABORT || ch=='Q' || ch==CR || !online) + if(sys_status&SS_ABORT || ch==text[YNQP][2] || ch==CR || !online) break; if(ch=='?') { if((useron.misc&(WIP|RIP|HTML) || !(useron.misc&EXPERT)) @@ -569,14 +569,14 @@ void sbbs_t::qwk_sec() bprintf(text[UploadingREP],cfg.sys_id); xfer_prot_menu(XFER_BIDIR); mnemonics(text[ProtocolOrQuit]); - strcpy(tmp2,"Q"); + sprintf(tmp2,"%c",text[YNQP][2]); for(i=0;i<cfg.total_prots;i++) if(cfg.prot[i]->bicmd[0] && chk_ar(cfg.prot[i]->ar,&useron,&client)) { sprintf(tmp,"%c",cfg.prot[i]->mnemonic); strcat(tmp2,tmp); } ch=(char)getkeys(tmp2,0); - if(ch=='Q' || sys_status&SS_ABORT || !online) { + if(ch==text[YNQP][2] || sys_status&SS_ABORT || !online) { for(i=0;i<cfg.total_subs;i++) subscan[i].ptr=sav_ptr[i]; /* re-load saved pointers */ last_ns_time=ns_time; @@ -659,7 +659,7 @@ void sbbs_t::qwk_sec() /***************/ xfer_prot_menu(XFER_DOWNLOAD); mnemonics(text[ProtocolOrQuit]); - strcpy(tmp2,"Q"); + sprintf(tmp2,"%c",text[YNQP][2]); for(i=0;i<cfg.total_prots;i++) if(cfg.prot[i]->dlcmd[0] && chk_ar(cfg.prot[i]->ar,&useron,&client)) { sprintf(tmp,"%c",cfg.prot[i]->mnemonic); @@ -667,7 +667,7 @@ void sbbs_t::qwk_sec() } ungetkey(useron.prot); ch=(char)getkeys(tmp2,0); - if(ch=='Q' || sys_status&SS_ABORT || !online) { + if(ch==text[YNQP][2] || sys_status&SS_ABORT || !online) { for(i=0;i<cfg.total_subs;i++) subscan[i].ptr=sav_ptr[i]; /* re-load saved pointers */ last_ns_time=ns_time; @@ -725,14 +725,14 @@ void sbbs_t::qwk_sec() /******************/ xfer_prot_menu(XFER_UPLOAD); mnemonics(text[ProtocolOrQuit]); - strcpy(tmp2,"Q"); + sprintf(tmp2,"%c",txt[YNQP][2]); for(i=0;i<cfg.total_prots;i++) if(cfg.prot[i]->ulcmd[0] && chk_ar(cfg.prot[i]->ar,&useron,&client)) { sprintf(tmp,"%c",cfg.prot[i]->mnemonic); strcat(tmp2,tmp); } ch=(char)getkeys(tmp2,0); - if(ch=='Q' || sys_status&SS_ABORT || !online) + if(ch==text[YNQP][2] || sys_status&SS_ABORT || !online) continue; for(i=0;i<cfg.total_prots;i++) if(cfg.prot[i]->ulcmd[0] && cfg.prot[i]->mnemonic==ch diff --git a/src/sbbs3/text.h b/src/sbbs3/text.h index 264211a355cbe4e5a7a84883dea99f018878f13e..f2dddf172e93f2265c99d38a11f63e530b73f9cc 100644 --- a/src/sbbs3/text.h +++ b/src/sbbs3/text.h @@ -8,7 +8,7 @@ * @format.tab-size 4 (Plain Text/Source Code File Header) * * @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) * * * - * Copyright 2009 Rob Swindell - http://www.synchro.net/copyright.html * + * Copyright 2015 Rob Swindell - http://www.synchro.net/copyright.html * * * * This program is free software; you can redistribute it and/or * * modify it under the terms of the GNU General Public License * @@ -763,7 +763,7 @@ enum { ,NodeActionPrivateChat ,NodeActionPaging ,NodeActionRetrieving - ,YN /* (Yes/No/Quit/Password chars) */ + ,YNQP /* (Yes/No/Quit/Password chars) */ ,ViewSignatureQ ,DeleteSignatureQ ,CreateEditSignatureQ diff --git a/src/sbbs3/upload.cpp b/src/sbbs3/upload.cpp index 12bf28b771a31df74f88bc9503aee53e5768f4f4..7823a8aa72ae8401fbc71e74e34f99b13b429a73 100644 --- a/src/sbbs3/upload.cpp +++ b/src/sbbs3/upload.cpp @@ -8,7 +8,7 @@ * @format.tab-size 4 (Plain Text/Source Code File Header) * * @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) * * * - * Copyright 2011 Rob Swindell - http://www.synchro.net/copyright.html * + * Copyright 2015 Rob Swindell - http://www.synchro.net/copyright.html * * * * This program is free software; you can redistribute it and/or * * modify it under the terms of the GNU General Public License * @@ -470,7 +470,7 @@ bool sbbs_t::upload(uint dirnum) } else { xfer_prot_menu(XFER_UPLOAD); SYNC; - strcpy(keys,"Q"); + sprintf(keys,"%c",text[YNQP][2]); if(dirnum==cfg.user_dir || !cfg.max_batup) /* no batch user to user xfers */ mnemonics(text[ProtocolOrQuit]); else { @@ -483,7 +483,7 @@ bool sbbs_t::upload(uint dirnum) strcat(keys,tmp); } ch=(char)getkeys(keys,0); - if(ch=='Q') + if(ch==text[YNQP][2] || (sys_status&SS_ABORT)) return(false); if(ch=='B') { if(batup_total>=cfg.max_batup) @@ -620,14 +620,14 @@ bool sbbs_t::recvfile(char *fname, char prot) else { xfer_prot_menu(XFER_UPLOAD); mnemonics(text[ProtocolOrQuit]); - strcpy(keys,"Q"); + sprintf(keys,"%c",text[YNQP][2]); for(i=0;i<cfg.total_prots;i++) if(cfg.prot[i]->ulcmd[0] && chk_ar(cfg.prot[i]->ar,&useron,&client)) sprintf(keys+strlen(keys),"%c",cfg.prot[i]->mnemonic); ch=(char)getkeys(keys,0); - if(ch=='Q' || sys_status&SS_ABORT) + if(ch==text[YNQP][2] || sys_status&SS_ABORT) return(false); } for(i=0;i<cfg.total_prots;i++) diff --git a/src/sbbs3/useredit.cpp b/src/sbbs3/useredit.cpp index ecbfb6cbfc1d5b40f8ea3774f6f0a7d98371f094..12d69c771f0d1483ece3997b056315e28675715a 100644 --- a/src/sbbs3/useredit.cpp +++ b/src/sbbs3/useredit.cpp @@ -8,7 +8,7 @@ * @format.tab-size 4 (Plain Text/Source Code File Header) * * @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) * * * - * Copyright 2011 Rob Swindell - http://www.synchro.net/copyright.html * + * Copyright 2015 Rob Swindell - http://www.synchro.net/copyright.html * * * * This program is free software; you can redistribute it and/or * * modify it under the terms of the GNU General Public License * @@ -1053,14 +1053,14 @@ void sbbs_t::maindflts(user_t* user) xfer_prot_menu(XFER_DOWNLOAD); SYNC; mnemonics(text[ProtocolOrQuit]); - SAFECOPY(str,"Q"); + sprintf(str,"%c",text[YNQP][2]); for(i=0;i<cfg.total_prots;i++) if(cfg.prot[i]->dlcmd[0] && chk_ar(cfg.prot[i]->ar,&useron,&client)) { SAFEPRINTF(tmp,"%c",cfg.prot[i]->mnemonic); strcat(str,tmp); } ch=(char)getkeys(str,0); - if(ch=='Q' || sys_status&SS_ABORT) { + if(ch==text[YNQP][2] || sys_status&SS_ABORT) { ch=' '; putuserrec(&cfg,user->number,U_PROT,1,&ch); }