Skip to content
Snippets Groups Projects
Commit 0fd16ccc authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

P-restricted users (including QWKnet accounts) can no-longer post polls

This was a loop-hole that caused Denn (OUTWEST) some confusion, those his
QWKnet account could post polls, it could not post messages due to having the
P-restriction.
parent aad70851
No related branches found
No related tags found
1 merge request!455Update branch with changes from master
Pipeline #6422 failed
......@@ -1085,7 +1085,16 @@ bool sbbs_t::qwk_vote(str_list_t ini, const char* section, smb_net_type_t net_ty
smb_freemsgmem(&msg);
return false;
}
if (hubnum == -1 && strnicmp(section, "poll:", 5) == 0) {
char str[256];
uint reason = CantPostOnSub;
if(!can_user_post(&cfg, smb.subnum, &useron, &client, &reason)) {
bputs(text[reason]);
SAFEPRINTF2(str, "QWK Poll not allowed, reason = %u (%s)", reason, text[reason]);
logline(LOG_NOTICE, "P!", str);
return false;
}
}
if((result = smb_open_sub(&cfg, &smb, smb.subnum)) != SMB_SUCCESS) {
errormsg(WHERE, ERR_OPEN, smb.file, 0, smb.last_error);
return false;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment