Skip to content
Snippets Groups Projects
logon.src 2.48 KiB
# logon.src

# Synchronet v2.20 Logon Module

# $Id$

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

!include sbbsdefs.inc

or _node_misc NM_NOPAUSESPIN	# Disable spinning cursor at pause prompts

compare_ars rest G
if_true
	:get_name
	print "\1y\1hFor our records, please enter your full name: \1w"
	getname 25
	compare_str ""
	if_true
		goto get_name
		end_if
	log "Guest: "
	logstr
	set_user_string user_string_realname
	
	:get_loc
	print "\1y\1hPlease enter your location (City, State): \1w"
	getname 30
	compare_str ""
	if_true
		goto get_loc
		end_if
	log "  "
	logstr
	set_user_string user_string_location

#	:get_phone
#	print "\1y\1hPlease enter your voice telephone number: "
#	get_template nnn-nnn-nnnn
#	compare_str ""
#	if_true
#		goto get_phone
#		end_if
#	log "  "
#	logstr
#	set_user_string user_string_phone
	log "\r\n"
	:get_mag
	print "yhWhere did you hear about this BBS?\r\n: w"
	getstr 70
	compare_str ""
	if_true
		goto get_mag
		end_if
	logstr
	log "\r\n"
	end_if

#compare_ars rest G or rest X or flag S
#if_false
#	no_yes Do you want to enter the \1cSynchronet Match Maker\1b
#	if_false
#		exec_xtrn smm
#		end_if
#	end_if

# Force split-screen chat on ANSI users
compare_user_misc UM_ANSI
if_true
	compare_user_chat CHAT_SPLITP
	if_false
		toggle_user_chat CHAT_SPLITP
		end_if
	end_if

# Inactivity exemption
compare_ars exempt H
if_true
	or _console CON_NO_INACT
	end_if

###############################################################################
# Replaces the 2.1 Logon stuff
##############################
int i

# Logon screens

compare_ars LOCAL
if_true
	goto logon_event
	end_if

sprintf str "logon%ld" _useron.level
chkfile "%zmenu/%s.*"
if_true
        menu "%s"
        end_if

set i 0
:logon_screens
	add i 1
	compare i 1
	if_equal
		set str "logon"
	else
		sprintf str "logon%ld" i
		end_if
	chkfile "%zmenu/%s.*"
	if_false
		goto logon_event
		end_if
	menu "%s"
	compare_user_misc UM_WIP
	if_true
		getkey
		end_if
	goto logon_screens

:logon_event
cls
user_event event_logon

# Last few callers
clear_abort
cls
str logonlst
set logonlst "%jlogon.lst"
get_file_length i logonlst
compare i 1
if_less
	print "\1n\1g\1hYou are the first caller of the day!\r\n"
else
	print "\1n\1g\1hLast few callers:\1n\r\n"
	printtail logonlst P_NOATCODES 4
	crlf
	endif

# Auto-message
setstr "%jmsgs/auto.msg"
get_file_length i str
compare i 0 
if_greater
	printfile str P_NOATCODES
	crlf
	end_if

# Automatically set shell to WIPSHELL
compare_user_misc UM_WIP
if_true
	setstr "WIPSHELL"
	set_shell
	end_if