Commit f228adff authored by rswindell's avatar rswindell
Browse files

Updated logline() calls to include user's alias.

parent e97eb90e
......@@ -236,8 +236,9 @@ int sbbs_t::bulkmailhdr(uint usernum, smbmsg_t *msg, ushort msgattr, ulong offse
// smb_incdat(&smb,offset,length,1); Remove 04/15/96
lncntr=0;
bprintf("Bulk Mailed %s #%d\r\n",username(&cfg, usernum,tmp),usernum);
sprintf(str,"Bulk Mailed %s #%d",username(&cfg, usernum,tmp),usernum);
bprintf("Bulk-mailed %s #%d\r\n",username(&cfg, usernum,tmp),usernum);
sprintf(str,"%s bulk-mailed %s #%d"
,useron.alias,username(&cfg, usernum,tmp),usernum);
logline("E+",str);
useron.emails++;
logon_emails++;
......
......@@ -743,8 +743,8 @@ void sbbs_t::privchat(bool local)
,cfg.node_num,thisnode.misc&NODE_ANON
? text[UNKNOWN_USER] : useron.alias);
putnmsg(n,str);
sprintf(str,"Paged %s on node %d to private chat"
,username(&cfg,node.useron,tmp),n);
sprintf(str,"%s paged %s on node %d to private chat"
,useron.alias,username(&cfg,node.useron,tmp),n);
logline("C",str); }
getnodedat(cfg.node_num,&thisnode,1);
......@@ -1287,8 +1287,8 @@ void sbbs_t::nodemsg()
CRLF;
break; }
putsmsg(&cfg,usernumber,buf);
sprintf(str,"Sent telegram to %s #%u"
,username(&cfg,usernumber,tmp),usernumber);
sprintf(str,"%s sent telegram to %s #%u"
,useron.alias,username(&cfg,usernumber,tmp),usernumber);
logline("C",str);
logline(nulstr,logbuf);
bprintf(text[MsgSentToUser],"Telegram"
......@@ -1320,8 +1320,8 @@ void sbbs_t::nodemsg()
if(!(node.misc&NODE_ANON))
bprintf(text[MsgSentToUser],"Message"
,username(&cfg,usernumber,tmp),usernumber);
sprintf(str,"Sent message to %s on node %d:"
,username(&cfg,usernumber,tmp),i);
sprintf(str,"%s sent message to %s on node %d:"
,useron.alias,username(&cfg,usernumber,tmp),i);
logline("C",str);
logline(nulstr,line); } }
else { /* ALL */
......@@ -1339,8 +1339,10 @@ void sbbs_t::nodemsg()
|| (SYSOP && node.status==NODE_QUIET))
&& (SYSOP || !(node.misc&NODE_POFF)))
putnmsg(i,buf); }
logline("C","Sent message to all nodes");
logline(nulstr,line); }
sprintf(str,"%s sent message to all nodes",useron.alias);
logline("C",str);
logline(nulstr,line);
}
break;
case 'C': /* Chat */
bputs("Chat\r\n");
......
......@@ -56,7 +56,9 @@ void sbbs_t::downloadfile(file_t* f)
logon_dlb+=length; /* Update 'this call' stats */
logon_dls++;
bprintf(text[FileNBytesSent],f->name,ultoac(length,tmp));
sprintf(str,"Downloaded %s from %s %s",f->name,cfg.lib[cfg.dir[f->dir]->lib]->sname
sprintf(str,"%s downloaded %s from %s %s"
,useron.alias
,f->name,cfg.lib[cfg.dir[f->dir]->lib]->sname
,cfg.dir[f->dir]->sname);
logline("D-",str);
/****************************/
......@@ -274,13 +276,16 @@ bool sbbs_t::checkprotlog(file_t* f)
if((stream=fnopen(&file,str,O_RDONLY))==NULL) {
bprintf(text[FileNotSent],f->name);
if(f->dir<cfg.total_dirs)
sprintf(str,"Attempted to download %s (%s) from %s %s"
sprintf(str,"%s attempted to download %s (%s) from %s %s"
,useron.alias
,f->name,ultoac(f->size,size)
,cfg.lib[cfg.dir[f->dir]->lib]->sname,cfg.dir[f->dir]->sname);
else if(f->dir==cfg.total_dirs)
strcpy(str,"Attempted to download QWK packet");
sprintf(str,"%s attempted to download QWK packet"
,useron.alias);
else if(f->dir==cfg.total_dirs+1)
sprintf(str,"Attempted to download attached file: %s",f->name);
sprintf(str,"%s attempted to download attached file: %s"
,useron.alias,f->name);
logline("D!",str);
return(0); }
unpadfname(f->name,tmp);
......@@ -302,10 +307,11 @@ bool sbbs_t::checkprotlog(file_t* f)
fclose(stream);
bprintf(text[FileNotSent],f->name);
if(f->dir<cfg.total_dirs)
sprintf(str,"Attempted to download %s (%s) from %s %s",f->name
sprintf(str,"%s attempted to download %s (%s) from %s %s",f->name
,useron.alias
,ultoac(f->size,tmp),cfg.lib[cfg.dir[f->dir]->lib]->sname,cfg.dir[f->dir]->sname);
else
strcpy(str,"Attempted to download QWK packet");
sprintf(str,"%s attempted to download QWK packet",useron.alias);
logline("D!",str);
return(false);
}
......
......@@ -296,7 +296,8 @@ bool sbbs_t::email(int usernumber, char *top, char *subj, long mode)
useron.etoday++;
putuserrec(&cfg,useron.number,U_ETODAY,5,ultoa(useron.etoday,tmp,10));
bprintf(text[Emailed],username(&cfg,usernumber,tmp),usernumber);
sprintf(str,"E-mailed %s #%d",username(&cfg,usernumber,tmp),usernumber);
sprintf(str,"%s sent e-mail to %s #%d"
,useron.alias,username(&cfg,usernumber,tmp),usernumber);
logline("E+",str);
if(mode&WM_FILE && online==ON_REMOTE)
autohangup();
......
......@@ -350,10 +350,12 @@ bool sbbs_t::netmail(char *into, char *title, long mode)
if(!(useron.exempt&FLAG('S')))
subtract_cdt(&cfg,&useron,cfg.netmail_cost);
if(mode&WM_FILE)
sprintf(str,"Sent NetMail file attachment to %s (%s)"
sprintf(str,"%s sent NetMail file attachment to %s (%s)"
,useron.alias
,hdr.to,faddrtoa(addr));
else
sprintf(str,"Sent NetMail to %s (%s)"
sprintf(str,"%s sent NetMail to %s (%s)"
,useron.alias
,hdr.to,faddrtoa(addr));
logline("EN",str);
......@@ -712,7 +714,8 @@ void sbbs_t::qwktonetmail(FILE *rep, char *block, char *into, uchar fromhub)
useron.etoday++;
putuserrec(&cfg,useron.number,U_ETODAY,5,ultoa(useron.etoday,tmp,10));
sprintf(str,"Sent %s NetMail to %s (%s) via QWK"
sprintf(str,"%s sent %s NetMail to %s (%s) via QWK"
,useron.alias
,qnet ? "QWK":"Internet",name,qnet ? fulladdr : to);
logline("EN",str); }
......@@ -870,7 +873,9 @@ void sbbs_t::qwktonetmail(FILE *rep, char *block, char *into, uchar fromhub)
useron.etoday++;
putuserrec(&cfg,useron.number,U_ETODAY,5,ultoa(useron.etoday,tmp,10));
sprintf(str,"Sent NetMail to %s @%s via QWK",hdr.to,faddrtoa(fidoaddr));
sprintf(str,"%s sent NetMail to %s @%s via QWK"
,useron.alias
,hdr.to,faddrtoa(fidoaddr));
logline("EN",str);
}
......
......@@ -544,7 +544,8 @@ bool sbbs_t::movefile(file_t* f, int newdir)
addfiledat(&cfg,f);
bprintf(text[MovedFile],f->name
,cfg.lib[cfg.dir[f->dir]->lib]->sname,cfg.dir[f->dir]->sname);
sprintf(str,"Moved %s to %s %s",f->name
sprintf(str,"%s moved %s to %s %s",f->name
,useron.alias
,cfg.lib[cfg.dir[f->dir]->lib]->sname,cfg.dir[f->dir]->sname);
logline(nulstr,str);
if(!f->altpath) { /* move actual file */
......@@ -1029,14 +1030,21 @@ int sbbs_t::listfileinfo(uint dirnum, char *filespec, long mode)
if(remove(str))
bprintf(text[CouldntRemoveFile],str);
else {
sprintf(tmp,"Deleted %s",str);
logline(nulstr,tmp); } } }
sprintf(tmp,"%s deleted %s"
,useron.alias
,str);
logline(nulstr,tmp);
}
}
}
break;
case 'R': /* remove file from database */
if(noyes(text[AreYouSureQ]))
break;
removefiledat(&cfg,&f);
sprintf(str,"Removed %s from %s %s",f.name
sprintf(str,"%s removed %s from %s %s"
,useron.alias
,f.name
,cfg.lib[cfg.dir[f.dir]->lib]->sname,cfg.dir[f.dir]->sname);
logline("U-",str);
sprintf(str,"%s%s",dirpath,fname);
......@@ -1046,8 +1054,13 @@ int sbbs_t::listfileinfo(uint dirnum, char *filespec, long mode)
if(remove(str))
bprintf(text[CouldntRemoveFile],str);
else {
sprintf(tmp,"Deleted %s",str);
logline(nulstr,tmp); } } }
sprintf(tmp,"%s deleted %s"
,useron.alias
,str);
logline(nulstr,tmp);
}
}
}
else if(remove(str)) /* always remove if not sysop */
bprintf(text[CouldntRemoveFile],str); }
if(dir_op(dirnum) || useron.exempt&FLAG('R')) {
......@@ -1126,7 +1139,9 @@ int sbbs_t::listfileinfo(uint dirnum, char *filespec, long mode)
addfiledat(&cfg,&f);
bprintf(text[MovedFile],f.name
,cfg.lib[cfg.dir[f.dir]->lib]->sname,cfg.dir[f.dir]->sname);
sprintf(str,"Moved %s to %s %s",f.name
sprintf(str,"%s moved %s to %s %s"
,useron.alias
,f.name
,cfg.lib[cfg.dir[f.dir]->lib]->sname,cfg.dir[f.dir]->sname);
logline(nulstr,str);
if(!f.altpath) { /* move actual file */
......
......@@ -275,7 +275,9 @@ bool sbbs_t::inetmail(char *into, char *subj, long mode)
useron.etoday++;
putuserrec(&cfg,useron.number,U_ETODAY,5,ultoa(useron.etoday,tmp,10));
sprintf(str,"Sent Internet Mail to %s (%s)",name,addr);
sprintf(str,"%s sent Internet Mail to %s (%s)"
,useron.alias
,name,addr);
logline("EN",str);
return(true);
}
......@@ -453,7 +455,9 @@ bool sbbs_t::qnetmail(char *into, char *subj, long mode)
useron.etoday++;
putuserrec(&cfg,useron.number,U_ETODAY,5,ultoa(useron.etoday,tmp,10));
sprintf(str,"Sent QWK NetMail to %s (%s)",to,fulladdr);
sprintf(str,"%s sent QWK NetMail to %s (%s)"
,useron.alias
,to,fulladdr);
logline("EN",str);
return(true);
}
......@@ -346,10 +346,12 @@ void sbbs_t::newuser()
console&=~(CON_R_ECHOX|CON_L_ECHOX);
if(!strcmp(str,useron.pass)) break;
if(cfg.sys_misc&SM_ECHO_PW)
sprintf(tmp,"FAILED Password verification: '%s' instead of '%s'",str
sprintf(tmp,"%s FAILED Password verification: '%s' instead of '%s'",str
,useron.alias
,useron.pass);
else
sprintf(tmp,"FAILED Password verification");
sprintf(tmp,"%s FAILED Password verification"
,useron.alias);
logline(nulstr,tmp);
if(++c==4) {
logline("N!","Couldn't figure out password.");
......@@ -365,7 +367,7 @@ void sbbs_t::newuser()
getstr(str,50,K_UPPER);
if(strcmp(str,cfg.new_magic)) {
bputs(text[FailedMagicWord]);
sprintf(tmp,"Failed magic word: '%s'",str);
sprintf(tmp,"%s failed magic word: '%s'",useron.alias,str);
logline("N!",tmp);
hangup(); }
if(!online) return; }
......
......@@ -337,7 +337,8 @@ bool sbbs_t::postmsg(uint subnum, smbmsg_t *remsg, long wm_mode)
putuserrec(&cfg,useron.number,U_PTODAY,5,ultoa(useron.ptoday,str,10));
bprintf(text[Posted],cfg.grp[cfg.sub[subnum]->grp]->sname
,cfg.sub[subnum]->lname);
sprintf(str,"Posted on %s %s",cfg.grp[cfg.sub[subnum]->grp]->sname,cfg.sub[subnum]->lname);
sprintf(str,"%s posted on %s %s"
,useron.alias,cfg.grp[cfg.sub[subnum]->grp]->sname,cfg.sub[subnum]->lname);
logline("P+",str);
if(cfg.sub[subnum]->misc&SUB_FIDO && cfg.sub[subnum]->echomail_sem[0]) /* semaphore */
if((file=nopen(cmdstr(cfg.sub[subnum]->echomail_sem,nulstr,nulstr,NULL)
......
......@@ -306,7 +306,8 @@ void sbbs_t::qwk_success(ulong msgcnt, char bi, char prepack)
}
if(!prepack) {
logline("D-","Downloaded QWK packet");
sprintf(str,"%s downloaded QWK packet",useron.alias);
logline("D-",str);
posts_read+=msgcnt;
sprintf(str,"%sfile/%04u.qwk",cfg.data_dir,useron.number);
......
......@@ -275,10 +275,12 @@ bool sbbs_t::qwktomsg(FILE *qwk_fp, char *hdrblk, char fromhub, uint subnum
if(j) {
if(j==1) {
bprintf("\r\nDuplicate message\r\n");
if(subnum==INVALID_SUB)
logline("E!","Duplicate e-mail attempt");
else {
sprintf(str,"Duplicate message attempt in %s/%s"
if(subnum==INVALID_SUB) {
sprintf(str,"%s duplicate e-mail attempt",useron.alias);
logline("E!",str);
} else {
sprintf(str,"%s duplicate message attempt in %s %s"
,useron.alias
,cfg.grp[cfg.sub[subnum]->grp]->sname
,cfg.sub[subnum]->lname);
logline("P!",str);
......
......@@ -135,12 +135,16 @@ void sbbs_t::readmail(uint usernumber, int which)
curmsg=0;
if(which==MAIL_ALL)
domsg=0; }
if(which==MAIL_SENT)
logline("E","Read sent mail");
else if(which==MAIL_ALL)
logline("S+","Read all mail");
else
logline("E","Read mail");
if(which==MAIL_SENT) {
sprintf(str,"%s read sent mail",useron.alias);
logline("E",str);
} else if(which==MAIL_ALL) {
sprintf(str,"%s read all mail",useron.alias);
logline("S+",str);
} else {
sprintf(str,"%s read mail",useron.alias);
logline("E",str);
}
if(useron.misc&RIP) {
strcpy(str,which==MAIL_YOUR ? "MAILREAD" : which==MAIL_ALL ?
"ALLMAIL" : "SENTMAIL");
......@@ -273,7 +277,8 @@ void sbbs_t::readmail(uint usernumber, int which)
bprintf(text[FileNBytesSent]
,fd.name,ultoac(length,tmp));
sprintf(str3
,"Downloaded attached file: %s"
,"%s downloaded attached file: %s"
,useron.alias
,fd.name);
logline("D-",str3); }
autohangup(); } } } }
......
......@@ -598,7 +598,8 @@ int sbbs_t::scanposts(uint subnum, long mode, char *find)
errormsg(WHERE,ERR_WRITE,smb.file,i);
smb_unlockmsghdr(&smb,&msg);
if(i==0 && msg.idx.attr&MSG_DELETE) {
sprintf(str,"Removed post from %s %s"
sprintf(str,"%s removed post from %s %s"
,useron.alias
,cfg.grp[cfg.sub[subnum]->grp]->sname,cfg.sub[subnum]->lname);
logline("P-",str);
if(!stricmp(cfg.sub[subnum]->misc&SUB_NAME
......
......@@ -67,7 +67,8 @@ void sbbs_t::scansubs(long mode)
found=searchsub(usrsub[curgrp][i],str);
subs_scanned++;
}
sprintf(tmp,"Searched %lu sub-boards for '%s'",subs_scanned,str);
sprintf(tmp,"%s searched %lu sub-boards for '%s'"
,useron.alias,subs_scanned,str);
logline(nulstr,tmp);
if(!found)
CRLF;
......@@ -140,7 +141,8 @@ void sbbs_t::scanallsubs(long mode)
}
if(!found)
CRLF;
sprintf(tmp,"Searched %lu sub-boards for '%s'",subs_scanned,str);
sprintf(tmp,"%s searched %lu sub-boards for '%s'"
,useron.alias,subs_scanned,str);
logline(nulstr,tmp);
return; } }
else if(mode&SCAN_TOYOU && i) {
......
......@@ -221,7 +221,8 @@ int sbbs_t::text_sec()
strcpy(str,file[i]);
attr(LIGHTGRAY);
printfile(str,0);
sprintf(str,"Read Text File: %s",file[i]);
sprintf(str,"%s read text file: %s"
,useron.alias,file[i]);
logline("T-",str);
pause();
sys_status&=~SS_ABORT;
......
......@@ -118,7 +118,8 @@ void sbbs_t::temp_xfer()
break;
if(!checkfname(str))
break;
sprintf(tmp2,"Added %s to %s",str,f.name);
sprintf(tmp2,"%s added %s to %s"
,useron.alias,str,f.name);
logline(nulstr,tmp2);
sprintf(tmp2,"%s%s",cfg.temp_dir,str);
sprintf(str,"%s%s",cfg.temp_dir,f.name);
......@@ -386,7 +387,7 @@ void sbbs_t::extract(uint dirnum)
,EX_INR|EX_OUTL|EX_OUTR))!=0) {
errormsg(WHERE,ERR_EXEC,cmdstr(excmd,path,str,NULL),i);
return; }
sprintf(tmp,"Extracted %s from %s",str,path);
sprintf(tmp,"%s extracted %s from %s",useron.alias,str,path);
logline(nulstr,tmp);
CRLF;
break;
......
......@@ -224,7 +224,8 @@ bool sbbs_t::unpack_rep(char* repfile)
putuserrec(&cfg,useron.number,U_ETODAY,5
,ultoa(useron.etoday,tmp,10));
bprintf(text[Emailed],username(&cfg,j,tmp),j);
sprintf(str,"E-mailed %s #%d",username(&cfg,j,tmp),j);
sprintf(str,"%s sent e-mail to %s #%d"
,useron.alias,username(&cfg,j,tmp),j);
logline("E+",str);
if(useron.rest&FLAG('Q')) {
sprintf(tmp,"%-25.25s",block+46);
......@@ -266,7 +267,7 @@ bool sbbs_t::unpack_rep(char* repfile)
k--; /* k is sub */
if(j>=usrgrps || k>=usrsubs[j] || cfg.sub[usrsub[j][k]]->qwkconf) {
bprintf(text[QWKInvalidConferenceN],n);
sprintf(str,"Invalid conference number %d",n);
sprintf(str,"%s: Invalid conference number %d",useron.alias,n);
logline("P!",str);
continue; } }
......@@ -393,8 +394,8 @@ bool sbbs_t::unpack_rep(char* repfile)
putuserrec(&cfg,useron.number,U_PTODAY,5,ultoa(useron.ptoday,str,10));
bprintf(text[Posted],cfg.grp[cfg.sub[n]->grp]->sname
,cfg.sub[n]->lname);
sprintf(str,"Posted on %s/%s",cfg.grp[cfg.sub[n]->grp]->sname
,cfg.sub[n]->lname);
sprintf(str,"%s posted on %s %s"
,useron.alias,cfg.grp[cfg.sub[n]->grp]->sname,cfg.sub[n]->lname);
if(cfg.sub[n]->misc&SUB_FIDO && cfg.sub[n]->echomail_sem[0]) /* semaphore */
if((file=nopen(cmdstr(cfg.sub[n]->echomail_sem,nulstr,nulstr,NULL)
,O_WRONLY|O_CREAT|O_TRUNC))!=-1)
......
......@@ -64,7 +64,9 @@ bool sbbs_t::uploadfile(file_t *f)
: cfg.dir[f->dir]->path,unpadfname(f->name,fname));
if(!fexist(path)) {
bprintf(text[FileNotReceived],f->name);
sprintf(str,"Attempted to upload %s to %s %s (Not received)",f->name
sprintf(str,"%s attempted to upload %s to %s %s (Not received)"
,useron.alias
,f->name
,cfg.lib[cfg.dir[f->dir]->lib]->sname,cfg.dir[f->dir]->sname);
logline("U!",str);
return(0); }
......@@ -94,7 +96,9 @@ bool sbbs_t::uploadfile(file_t *f)
if(SYSOP) {
if(!yesno(text[DeleteFileQ])) return(0); }
remove(path);
sprintf(str,"Attempted to upload %s to %s %s (%s Errors)",f->name
sprintf(str,"%s attempted to upload %s to %s %s (%s Errors)"
,useron.alias
,f->name
,cfg.lib[cfg.dir[f->dir]->lib]->sname,cfg.dir[f->dir]->sname,cfg.ftest[i]->ext);
logline("U!",str);
return(0); }
......@@ -123,7 +127,9 @@ bool sbbs_t::uploadfile(file_t *f)
if((length=flength(path))<=0L) {
bprintf(text[FileZeroLength],f->name);
remove(path);
sprintf(str,"Attempted to upload %s to %s %s (Zero length)",f->name
sprintf(str,"%s attempted to upload %s to %s %s (Zero length)"
,useron.alias
,f->name
,cfg.lib[cfg.dir[f->dir]->lib]->sname,cfg.dir[f->dir]->sname);
logline("U!",str);
return(0); }
......@@ -177,7 +183,9 @@ bool sbbs_t::uploadfile(file_t *f)
if(f->misc&FM_EXTDESC)
putextdesc(&cfg,f->dir,f->datoffset,ext);
sprintf(str,"Uploaded %s to %s %s",f->name,cfg.lib[cfg.dir[f->dir]->lib]->sname
sprintf(str,"%s uploaded %s to %s %s"
,useron.alias
,f->name,cfg.lib[cfg.dir[f->dir]->lib]->sname
,cfg.dir[f->dir]->sname);
if(cfg.dir[f->dir]->upload_sem[0])
if((file=nopen(cmdstr(cfg.dir[f->dir]->upload_sem,nulstr,nulstr,NULL)
......
......@@ -983,7 +983,8 @@ void sbbs_t::maindflts(user_t* user)
now=time(NULL);
putuserrec(&cfg,user->number,U_PWMOD,8,ultoa(now,tmp,16));
bputs(text[PasswordChanged]);
logline(nulstr,"Changed password");
sprintf(str,"%s changed password",useron.alias);
logline(nulstr,str);
pause();
break;
case 'Z':
......
......@@ -896,7 +896,9 @@ void sbbs_t::forwardmail(smbmsg_t *msg, int usernumber)
copyfattach(usernumber,useron.number,msg->subj);
bprintf(text[Forwarded],username(&cfg,usernumber,str),usernumber);
sprintf(str,"Forwarded mail to %s #%d",username(&cfg,usernumber,tmp)
sprintf(str,"%s forwarded mail to %s #%d"
,useron.alias
,username(&cfg,usernumber,tmp)
,usernumber);
logline("E",str);
msg->idx=idx;
......@@ -1186,7 +1188,8 @@ bool sbbs_t::movemsg(smbmsg_t* msg, uint subnum)
bprintf("\r\nMoved to %s %s\r\n\r\n"
,cfg.grp[usrgrp[newgrp]]->sname,cfg.sub[newsub]->lname);
sprintf(str,"Moved message from %s %s to %s %s"
sprintf(str,"%s moved message from %s %s to %s %s"
,useron.alias
,cfg.grp[newgrp]->sname,cfg.sub[newsub]->sname
,cfg.grp[cfg.sub[subnum]->grp]->sname,cfg.sub[subnum]->sname);
logline("M+",str);
......
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