# login.src

# Login module for Synchronet BBS v2.2+

# $Id: login.src,v 1.7 2002/11/14 03:46:53 rswindell Exp $

# @format.tab-size 8, @format.use-tabs true

!include sbbsdefs.inc

logout

node_status NODE_LOGON

compare_ars WIP
if_true
	exec_bin WIPLOGIN
	return
	end_if

int c
int guest

set str "Guest"
matchuser guest str		# save Guest account number in guest

:top
compare c 10
if_greater_or_equal
	hangup
	return
	end_if

compare guest 0	# Guest account?
if_greater
	print "\r\n\1nEnter Name, Number, '\1hNew\1n', or '\1hGuest\1n'\r\nNN: "
else
	print "\r\n\1nEnter Name, Number, or '\1hNew\1n'\r\nNN: "
	end_if
getstr str 25 K_UPRLWR|K_LOWPRIO|K_E71DETECT|K_TAB
truncsp str
compare_str ""
if_true
	add c 1
	goto top
	end_if
compare_str "NEW"
if_true
	newuser
	if_false
		add c 1
		goto top
		end_if
	logon
	return
	end_if
login "PW: "
if_true
	logon
	if_true
		return
		end_if
	end_if
add c 2
goto top

