Skip to content
Snippets Groups Projects
Commit 513773fc authored by rswindell's avatar rswindell
Browse files

Generates a warning in the log (and the user's comment field) if the new...

Generates a warning in the log (and the user's comment field) if the new user's IP address matches an existing user.
parent 166bdff7
No related branches found
No related tags found
No related merge requests found
......@@ -123,6 +123,11 @@ void sbbs_t::newuser()
useron.sex=SP;
useron.prot=cfg.new_prot;
strcpy(useron.note,cid); /* Caller ID if supported, NULL otherwise */
if((i=userdatdupe(0,U_NOTE,LEN_NOTE,cid,true))!=0) { /* Duplicate IP address */
sprintf(useron.comment,"Warning: same IP address as user #%d",i);
logline("N!",useron.comment);
}
strcpy(useron.alias,"New"); /* just for status line */
strcpy(useron.modem,connection);
if(!lastuser(&cfg)) { /* Automatic sysop access for first user */
......
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