@comment Tell Emacs to use -*-texinfo-*- mode
@comment $Id: sysopref.tex,v 2.5 91/09/01 23:04:47 royce Exp $

@node The Sysop Command Reference, Modem Stuff, Aide and Co-Sysop Command Reference, Top
@chapter The Sysop Command Reference
@cindex Commands, sysop
@cindex Sysop commands

As has been mentioned before, Fnordadel makes a distinction between
``a user with Co-Sysop status'' and ``the Sysop''.  ``The Sysop'' is
assumed to be you,
the guy/gal who runs the system, and there are therefore some commands which
we figure only you will want to use.  Some of these commands are useful only
from the system console, and in most such cases you don't even have to be logged
in to use them.

Fnordadel lets you define a specific user name to be used as a
synonym within the system for @samp{Sysop}.  To set this up, modify the
@vindex sysop
@code{#sysop} parameter in @file{ctdlcnfg.sys}, as appropriate.

As added conveniences, Fnordadel automatically assigns
this user Aide, Net and Sysop privileges when he/she logs in after the system
(or just the user log) is reconfigured from scratch.  Also, any local or network
private mail to @samp{Sysop} is redirected to the user name specified.  Finally,
the Sysop is allowed to archive his/her private mail to a disk file if
@vindex sysop
@code{#sysop} is set.

If you do not set the value of
@vindex sysop
@code{#sysop} correctly or at all, your system will
not explode.  However, it won't know where to send private mail entered to
@samp{Sysop}, so all such mail will be dumped into the @code{Aide>} room, where all
users present there can see it.  This is probably not a desirable thing, but
might actually be beneficial, for example on systems with more than one Sysop.
Also, if
@vindex sysop
@code{#sysop} is not set, Sysop mail archiving is not available.

@node Sysop Special Functions, Miscellaneous Features and Commands, The Sysop Command Reference, The Sysop Command Reference
@section The Sysop Special Functions Menu
@cindex Sysop special functions
@cindex Sysop menu

To perform most Sysop-specific functions, you must first get to the Sysop menu.
If you're on the console, first ensure that Fnordadel is in console mode.
If it is in modem mode (i.e., waiting for somebody to call, or dealing with a
user currently online), hit the @samp{<ESC>} key.  If you're calling in from remote,
and you have a system password defined in @file{ctdlcnfg.sys}, just ensure that you're
at a room prompt.  (If there is no system password defined, you will be
unable to proceed further as the system will not allow any remote user access
to the Sysop menu without entering the system password.)

Note: If somebody is logged in and you wish to go to console mode,
do not hit @samp{<ESC>} unless the user is at the main room prompt, or strange
things may happen.  Also, once you have interrupted the user, anything you
do as Sysop will be echoed to the user's screen.  This includes any command
you execute from the Sysop menu.

If all is in readiness, now press @samp{^L}.  If you're calling from
remote, you will now have to enter the system password.  This is a point which
bears repeating:  Giving your users Aide, Co-Sysop or any other status does not
get them access to the Sysop menu.  Any users lacking Co-Sysop status can not
even execute the @samp{^L} command.  Those users with Co-Sysop status won't be
able to do anything with the command unless you've given them the system password.

Note that if you call in from remote, the system does not automatically identify
you as ``the Sysop'', even though it could check your user name against the one
defined by
@vindex sysop
@code{#sysop}, if you have set that parameter.  The reason is that if
somebody ever cracked your password, they would instantly have access to all
system commands.

As it stands, when you call there will be a few things not
available to you that would normally be available if you were on the system
console.  Most of them will reappear if you hit @samp{^L} and enter the system
password.  At that point the system identifies you (and, indeed, any Co-Sysop
who might do the same thing) as ``the Sysop''.  All commands will then be
made available, except for a few that make no sense from remote (like dialing
other systems from the Sysop menu).

Having reached the menu, you will see the prompt @samp{sysop cmd:}.  To get
a list of available functions, hit the @samp{?} key.  You should see something
close to the following:

@cindex ^L menu
@cindex Sysop special functions menu
@example
[A]bnormal system exit
[B]aud selection
[C]hat toggle
[D]- Toggle debug mode
[E]- Toggle screen echo
[F]ile grab
[G]odirectlytomodemdonotpassGo
[I]nformation
[M]ODEM mode
[N]etwork commands
[O]utside commands
[P]urge menu
[Q]uit citadel
[R]einitialize Modem
[S]et date
[T]elephone call
[U]ser status commands
[W]estwict menu
e[X]it sysop menu
[Y]- Show time til next event
[Z]- Autodial
@end example

@table @code
@item [A]bnormal system exit
This command will probably be rarely used.  It lets you take
your system down, and specify the return value to be given to whatever
started @code{citadel}.  You will first be asked to confirm the action,
and then asked for the return value, which defaults to 0, (which
indicates a normal exit), or, if executed from remote, 3 (which
indicates a remote exit); these defaults are equivalent to using the
@code{[Q]uit} command.  If you enter a non-default return value,
everything normally done during a system exit will still be done, including
saving @file{ctdltabl.sys}.

The only real reason to use this option is if you have a shell
script controlling the activity of your set-up, and wish to pass it a
certain return code to get it to do something.  This can be convenient
if you are trying to test commands that are to be executed by the
script based on return codes given by @code{citadel} when it exits under
control of events you have defined.  @xref{Events}.

@item [B]aud selection
This command allows you to
temporarily override the system baud rate that you specified in
@file{ctdlcnfg.sys}.  The values permissible here are the same as in
@file{ctdlcnfg.sys}, i.e., @samp{0} for 300 baud, @samp{1} for
300/1200 baud, etc.

@item [C]hat toggle
This will toggle the chat flag on or off.  If it is on,
a user executing the @code{[C]hat} command will cause the console's bell to
ring, asking for your attention.  If the flag is off, users calling
for a chat will be shown the contents of the @file{nochat.blb} file.  The
setting of this toggle is preserved by the system when you exit from
Fnordadel, and will be set the same way the next time you start up.

@item [D]- Toggle debug mode
This command lets you toggle debug mode on or off.  It is of no
use to normal people, being primarily a switch to aid the Fnordadel
team when they're tracking a bug of some kind.

@item [E]- Toggle screen echo
This command lets you toggle screen echo on or off.  When echo is on,
all incoming and outgoing characters will be displayed on the console
screen, except in certain special situations such as password entry or
when the user is entering a message in @code{Mail>}.
When echo is off, nothing will be
displayed as users call and do their things.  When you hit @samp{<ESC>}
and enter console mode, everything is echoed to your screen no
matter how this toggle is set.

@item [F]ile grab
This command allows you to bring the contents of a text file
sitting somewhere on disk into your held message
buffer.  This allows you to incorporate text from diverse sources
into messages you post.  Beware the size limit of messages, 10000
characters.  Also beware of grabbing in files that have strange
formatting or control characters in them; the results may not be to
your taste.
@xref{The Message Editor}, and @ref{Multi-key message entry commands},
for information on the held message buffer.

As of this writing, grabbing files into held messages and
then posting the results in anonymous rooms doesn't work quite right.
The message will pop up as non-anonymous; if you wish it to be saved
as an anonymous message, you'll have to toggle it to be such using
the An[O]nymous command in the message editor, @emph{before} saving.
@xref{The Message Editor}, for details on this command.

@item [G]odirectlytomodemdonotpassGo
This command is a quick method (despite its name) of
returning online to a remote system that you have dialed from
within Fnordadel and temporarily escaped from (by hitting @samp{<ESC>})
to do something with your own system.  A common situation for
calling a system, escaping to do something on your own, and going
back again, is to do file transfers from the remote system into
your own, via @code{.E(nter) @dots{} F(ile)} or
@code{.E(nter @dots{} B(inary file)}.
@xref{File Transfers}.

@item [I]nformation
This command will produce some information about your
system, such as software version, free @sc{ram}, etc.  The exact details
displayed will vary from version to version, and will be mostly
useful for winning games of ``Trivial Pursuit---The Fnordadel
Edition''.

@item [M]ODEM mode
This will return your system to modem mode.  This is
not the same as the @code{[G]oto@dots{}} command above, which assumes that you
are interacting with a remote system, using Fnordadel as a
terminal program.  Rather, this will reset the system to waiting for
a call to come in, or, if there is a user online whom you've
preempted by going to console mode, will return system control
to that user.

Note that any user logged in at the console is not logged
off by this command.  The system will sit there waiting for a call,
but the user will still be logged in until a call is detected.  Only
at that point is the user punted off the system to make way for the
caller to connect.

@item [N]etwork commands
This gets you to the network menu, described in @ref{The Net Menu}.

@item [O]utside commands
This command allows you to escape from Fnordadel to an
external command shell, if you have defined one in @file{ctdlcnfg.sys}.  The
main reason for doing this is to poke around a hard drive-based @sc{bbs}
looking for certain files, or copying them from place to place.  You
could theoretically do anything you wanted, though, subject to @sc{ram}
limitations.  Be careful not to screw up your Fnordadel files, as
when you exit from the shell, control returns to Fnordadel.
This command is equivalent to the @code{!shell} door command, if you
have one defined.  @xref{The shell door}.

@item [P]urge menu
This takes you to the purge menu, described in @ref{Purge and Westwict menus}.

@item [Q]uit citadel
This command, if you answer @samp{Y} to the prompt that pops up,
will exit Fnordadel in the proper manner.  You will be returned to
the @sc{gem} desktop or your command shell, depending on how you started
Fnordadel in the first place.  You should always use this command
to take your system down, since it will write out the @file{ctdltabl.sys}
file, which contains all the configuration information generated
when you run @code{configur}.  If you just hit the reset button or shut
off your computer, you will have to run @code{configur} before you
can start Fnordadel again.

If this command is executed from the console, the return value
from @code{citadel} is @samp{0}.  If executed from remote (by a remote Sysop,
natch), the return value is @samp{3}.

@item [R]einitialize Modem
This command causes Fnordadel to send the modem
initialization string
@vindex modemsetup
(@code{#modemsetup}, defined in @file{ctdlcnfg.sys})
to the modem.  You
would do this if you suspect your modem's setup is a bit messed up,
and wish to reinitialize it under software control.  If there is a
carrier present when you execute this command, it will be dropped,
disconnecting whoever or whatever was on the other end.

@item [S]et date
This command permits you to set the system time and date.
The command is duplicated by the @code{.A(ide) S(et-date)} command, and is
the only such Sysop command that Aides have routine access to.

@item [T]elephone call
This command allows you to make one attempt at calling a node defined in your
net-list.  (See @code{[A]dd node} in @ref{The Net Menu}, for more details on
defining network nodes.)  If the call succeeds, you will be placed
in interactive mode online to whatever it is that you connect with.
If the call fails, you will be returned to the Sysop menu prompt.

@item [U]ser status commands
This takes you into the user status commands menu,
which offers various commands for transmogrifying users.  @xref{User Status Commands}.

@item [W]estwict menu
This takes you to the restrictions menu, which is described in
@ref{Purge and Westwict menus}.  Note that this command works even if you
are not Elmer Fudd.

@item e[X]it sysop menu
This command exits the Sysop command menu, and returns you to
Fnordadel in the same room that you left.  The system will remain in
console mode, so if you had hit @samp{<ESC>} and preempted a user who was
online at the time, you should not use this command.  Instead, use
the @code{[M]odem mode} command, described above.

@item [Y]- Show time til next event
If you have any events or network polling periods defined, this
command will show you a list of them, and give the exact time until the
soonest event will be triggered.
@xref{Events}, and @ref{Setting up for networking}, for details.

@item [Z]- Autodial
This command is like @code{[T]elephone}, in that it permits you to
dial out using your Fnordadel as a terminal program.  The difference
is that @code{[Z]} will ask for a list of nodes to call, terminated by
hitting a return at the prompt, and the number of times it
should loop through that list trying to get a connection.  As nodes
in the list are connected with, Fnordadel goes into interactive
mode online with each one.  You may abort the dialing sequence by
pressing any key.

When you hit @samp{<ESC>} to exit interactive mode after a call,
Fnordadel checks to see if there is still a carrier present on the
modem.  If not, it assumes you are done with that node, deletes it
from the list you supplied, and continues looping through the remaining
entries, if any.  If carrier is still present, however,
Fnordadel assumes that something tricky is going on, and tosses
out your dialing list.  To dial any nodes that may be remaining on
it, you will have to hit @samp{Z} and enter them again.
@end table
@comment Now done The Sysop Special Functions Menu

@node User Status Commands
@section User Status Commands
@cindex User status commands, sysop
@cindex Changing user attributes

As mentioned in @ref{Sysop Theory}, Citadels in general and Fnordadel in
particular are not systems that offer a lot of user privilege, status or
access level `features'.  Still, there are some special cases that need
to be dealt with on even the most open and egalitarian of systems.  The
@code{[U]ser status} menu is where you deal with them.  It is accessed from
the Sysop functions menu.  Hitting @samp{?} will give you the following list:

@cindex User status menu
@example
[A]ide status toggle
[C]redit setting
[D]oor privs toggle
[K]ill user
[M]ail privs toggle
[N]et privs toggle
[R]eset daily limits
[S]ysop status toggle
[T]wit status toggle
[V]iew user status
e[X]it to sysop menu
@end example

@table @code
@item [A]ide status toggle
@itemx [S]ysop status toggle
@itemx [T]wit status toggle
These three commands allow you to toggle Aide,
Sysop or Twit privileges, respectively, for any user.  Refer to
@ref{Your Callers}, for a discussion on the Aide, Sysop
and Twit types.

If you `twit' a user, the system will
check if that user has Aide or Sysop privileges.  If so, you will
be prompted to confirm your choice of twit status.  Going ahead
with the operation will revoke the user's Aide and/or Sysop
privs.  If you give someone Sysop privs, he or she automatically
gets Aide privs as well.  If you revoke someone's Aide privs,
Sysop privs disappear also.  And if you revoke someone's Sysop privs,
the system will courteously ask if you want to revoke Aide
privs as well.  Neat, huh?

Keep in mind that making a user a Co-Sysop by giving him or her Sysop
privileges does @emph{not} give that user automatic access to the
Sysop menu.  You must also give the user the system password, which
is defined using the
@vindex syspassword
@code{#syspassword} parameter in @file{ctdlcnfg.sys}.
If this parameter is left undefined, no remote user will ever be able to
enter the Sysop functions menu.  This includes you, if you dial in.

@item [C]redit setting
This command allows you to assign long-distance
networking credits to any user.  The credits are consumed
when the user enters networked @code{Mail>} messages to long-distance
destinations.  This permits you to control net
traffic, and apply a reasonable real money charge based on usage, if
you so wish.  @xref{Networking}, for more info.

Note that attempting to assign credits to a user who
doesn't yet have basic net privileges will cause the system
to prompt you about setting net privileges as well.  Also
note that anybody with Sysop or Co-Sysop status does not need credits to
send long-distance mail.

@item [D]oor privs toggle
This command allows you to grant or remove door
privileges for any user.  If you wish to have all
users normally possess the same door status by default, you can
define the
@vindex alldoor
@code{#alldoor} parameter in @file{ctdlcnfg.sys} to set default
door privs.  If
@vindex alldoor
@code{#alldoor} is @samp{1}, all users will be given
normal door access when they first call; if @samp{0},
only users with Sysop or Co-Sysop status have door access.  The default
value, if you don't set it explicitly, is @samp{1}.
However you set
@vindex alldoor
@code{#alldoor}, you can override the
system-wide automatic setting using this @code{[D]oor} toggle command
on individual users.

If you want to explicitly set the door privilege flag
for all existing users, use the @code{flipbits} utility, described
@pindex flipbits
in @file{flipbits.man}.

@item [K]ill user
This lets you delete a user's account; the system will prompt you for a
name and ask for confirmation.  The deletion is permanent and cannot be
reversed.  This means that
any private mail to or from the user will be lost even if the account is
immediately recreated with the identical name and password.  Likewise,
all access to invitation-only private rooms is removed.

@item [M]ail privs toggle
This command allows you to bestow or revoke private
mail privileges from any user.  If you wish to have all
users normally possess the same mail privilege, you can
define the
@vindex allmail
@code{#allmail} parameter in @file{ctdlcnfg.sys} to set the
default mail access assigned when users first call.

If
@vindex allmail
@code{#allmail} is @samp{1}, all users will be given
full access to the @code{Mail>} room, except for net-mail
considerations as controlled by network privileges and credits.
If
@vindex allmail
@code{#allmail} is @samp{0}, only users with Aide, Co-Sysop or Sysop
status have full access to the @code{Mail>} room.  All other
users are allowed to enter mail only to @samp{Sysop}.
@vindex allmail
@code{#allmail} defaults to @samp{1} if you don't specify it.

However you set
@vindex allmail
@code{#allmail}, you can override the
system-wide automatic setting using the @code{[M]ail} toggle on
individual users.  If you want to explicitly set the mail privilege flag
for all existing users, use the @code{flipbits} utility, described
@pindex flipbits
in @file{flipbits.man}.

@item [N]et-privs toggle
This command allows you to remove or assign network
privileges to any user.  Network privileges differ from
credit settings in that they must be possessed by a user to
enter network messages of any kind, public or private,
regardless of credit setting.  The sole exception to this
rule is the case of autonet networked rooms, which will
automatically make all messages networked, whether their
authors possess network privileges or not.

If you, as Sysop, are feeling particularly generous,
you can define a parameter
@vindex allnet
@code{#allnet} in @file{ctdlcnfg.sys} to give
all users on your system network privileges when they first
call, automatically.
This is a dangerous thing to do if you have any rooms that
are sent to long-distance systems, since an unscrupulous or
plain ignorant user could cost you or another Sysop a lot
of money.  The @code{[N]et} toggle overrides the automatic default
defined by
@vindex allnet
@code{#allnet}.

If you want to explicitly set the net privilege flag
@pindex flipbits
for all existing users, use the @code{flipbits} utility.

@item [R]eset daily limits
This command allows you to manually reset all of a user's daily limit
values to their initial states, effectively letting him or her start with a
clean slate on the next call.  The limits, which you can set the system
to use or ignore with various @file{ctdlcnfg.sys} parameters, normally
prevent users from doing too much of certain things like file downloading
or multiple calls per day.  If you ever need to wipe out the system's
record of a user's use of the system during the past day, this command
will do it.  @xref{Anti-Ruggie Measures}, for details on the daily limits.

@item [V]iew user status
This command can be used to view the current settings
of any user.  You will be told about things like net, door and
mail privileges, and Aide and/or Sysop privs, if any of
these is possessed by the user.  You are also shown the
values of the user's various limit values, such as network
credits, daily download amount, and other limits that you
may have defined (@pxref{Anti-Ruggie Measures}).

@item e[X]it to sysop menu
This command, as is hopefully obvious, returns you
to the Sysop command menu.
@end table
@comment Now done User Status Commands

@node Miscellaneous Features and Commands,  , Sysop Special Functions, The Sysop Command Reference
@section Miscellaneous Features and Commands

The following subsections describe bits of miscellany that are
specific to the Sysop.

@node Special keys, Chat recording, Miscellaneous Features and Commands, Miscellaneous Features and Commands
@subsection Special keys
@cindex Special keys
@cindex Commands while a user is online

There are several special commands that you as Sysop can execute from the
system console, while a remote user is online, and without having to hit
@samp{<ESC>} and go into console mode.  They are:

@table @samp
@cindex Console request
@cindex Request console
@findex ^R (request console)
@item ^R
@dfn{Console request}.  When a user is logged into your system and you wish
to use it yourself as soon as the user has logged off, normally you can just
sit and wait for him/her to finish and leave.  If you want to make sure that
you don't miss your chance to catch the system, you can request that Fnordadel
give you first crack when the current user leaves.  Pressing @samp{^R} any
time will set a console request flag, and let Fnordadel page you by beeping
the console bell for a few seconds when the user signs off.  An @samp{R}
appears in the status line when the request flag is on; see @ref{Status line}.

To answer the system's beeping, press any key, and Fnordadel will enter
console mode.  If you don't press a key to answer the call, Fnordadel will
return to modem mode after a short while.

@cindex Fake error
@findex ^E (fake error)
@item ^E
@dfn{Fake an error}.  This is a somewhat goofy one.  When you press @samp{^E}
Fnordadel will immediately pretend to have a fatal error and boot the user
off.  The message printed when the fake error happens will be the standard
Citadel crash message, @samp{Whoops! Think I'll die now...}, unless you have
placed a file called @file{fakeerr.blb} in your
@vindex helpdir
@code{#helpdir}, in which case
the contents of said file will be spit at the user.  You could use this
command when you need your system @emph{now} and want to evict an online
user, but feel too guilty to simply flick the power switch on your modem.

Once you hit @samp{E}, the system disconnects the user (as if he/she had
done a @samp{.TP} command).  It then behaves like @samp{^R}, described above,
and beeps at you to give you a chance to press a key to enter console mode.

@cindex Twit an online user
@findex ^T (twit online user)
@item ^T
@dfn{Twit a user dynamically}.  This one is even worse than @samp{^E}, or
at least more sneaky.  Pressing @samp{^T} will cause the current online
user to become a Twit (@pxref{Your Callers}), just as if you'd changed his
attributes in the usual way (@pxref{User Status Commands}).  Pressing @samp{^T}
again will toggle Twit status off again.  When the user has Twit status a
@samp{T} will appear in the status line; see @ref{Status line}.

@cindex Background process, Fnordadel as a
@findex ^Z (send Fnordadel to background)
@item ^Z
@dfn{Take Fnordadel to the background}.  This is used when you're running
Fnordadel under some sort of multitasker.  It detaches Fnordadel from the
console (i.e., makes it not display on the screen or listen to the keyboard).
@xref{Multitasking and Fnordadel}.
@end table

@node Chat recording, Mail receipt flag, Console request, Miscellaneous Features and Commands
@subsection Chat recording
@cindex Chat recording
@cindex Recording a chat

It is possible that you may want to have a record of a chat
between yourself and a user.  To capture your chat, press
@findex ^R
@code{^R} while
in chat mode, and Fnordadel will record the conversation to a
file.  Press @samp{^R} again to switch chat recording off.  The file that
Fnordadel uses is called @file{chat.rec}, and will be put in
@vindex auditdir
@code{#auditdir}.

Note that using @samp{^R} will cause Fnordadel to
spit out a message to the effect that this conversation is being
recorded.  It's generally considered good form to tell people that
you're recording them.

@node Mail receipt flag, Sysop room access, Chat recording, Miscellaneous Features and Commands
@subsection Mail receipt flag
@cindex Mail receipt flag
@cindex Received mail, flagging

Fnordadel normally marks all local @code{Mail>} messages as ``received''
when they are read by their recipients.  A @file{ctdlcnfg.sys} parameter,
@vindex showrecd
@code{#showrecd}, controls whether the receipt flag is actually displayed
to message readers.  Many users like to see it so
they know if the people they're mailing are getting the message and
not responding, or just not reading their mail.  The flag is always
displayed for the Sysop, regardless of the setting of
@vindex showrecd
@code{#showrecd}.

In order to give the Sysop a little more freedom from users
who want to know if their mail to the Sysop is getting through,
Fnordadel does not automatically update the receipt flag when the
Sysop reads mail.  Instead, there is a command available in the
@samp{more} menu (@pxref{More Mode}), called @code{[M]ark as received}.
This command lets the Sysop manually mark messages when desired.

@node Sysop room access, Forgotten passwords, Mail receipt flag, Miscellaneous Features and Commands
@subsection Sysop room access
@cindex Sysop room access

The Sysop is not allowed to forget rooms on the system, and
is automatically allowed access to any room, even if it is invitation-only
and nobody invited the Sysop.

@node Forgotten passwords,  , Sysop room access, Miscellaneous Features and Commands
@subsection Forgotten passwords
@cindex Forgotten passwords
@cindex Passwords, forgotten

If a user ever forgets his/her password, the Sysop can proceed
in a variety of ways (after making sure that the person complaining
about the problem is really the owner of the account in question).  We
will typically just kill the account in question, and let the user
sign on again.

If the user has unread private mail, or if the Sysop wants to
provide an uncommon level of direct support, killing the account isn't
a good idea.
@pindex clog
The Sysop could use the @code{clog} utility (see @file{clog.man}) to find out
the account's current password, then sign on with it
and change it to something requested by the user, or just tell the
user what the password is.  Alternatively, the Sysop could use the
@code{logedit} utility (see @file{logedit.man}) to directly alter the account's
@pindex logedit
password, and then inform the user of the new password.

