Skip to content
Snippets Groups Projects
Commit 2f6c4720 authored by rswindell's avatar rswindell
Browse files

Hangup the connection before returning false (logon failure) for several

semi-normal cases (e.g. user does not have permissions for this node). Fixes
"User not logged on" error.
parent 3a1ddb36
No related branches found
No related tags found
No related merge requests found
......@@ -71,8 +71,10 @@ bool sbbs_t::logon()
if(useron.rest&FLAG('Q'))
qwklogon=1;
if(SYSOP && !(cfg.sys_misc&SM_R_SYSOP))
if(SYSOP && !(cfg.sys_misc&SM_R_SYSOP)) {
hangup();
return(false);
}
if(useron.rest&FLAG('G')) { /* Guest account */
useron.misc=(cfg.new_misc&(~ASK_NSCAN));
......@@ -103,6 +105,7 @@ bool sbbs_t::logon()
sprintf(str,"(%04u) %-25s Insufficient node access"
,useron.number,useron.alias);
logline(LOG_NOTICE,"+!",str);
hangup();
return(false);
}
......@@ -114,6 +117,7 @@ bool sbbs_t::logon()
sprintf(str,"(%04u) %-25s Locked node logon attempt"
,useron.number,useron.alias);
logline(LOG_NOTICE,"+!",str);
hangup();
return(false);
}
if(yesno(text[RemoveNodeLockQ])) {
......
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