Simple Who

This is a very simple softcode who command (swho). It is crude and lacking a lot of nifty features and refinements, but should be easy for a novice coder to read through and upgrade as they see fit.

Author: nails@Gateway
Category: Globals
Commands: @create, @describe, @lock, @pemit, @set.

Instructions

Copy and paste the below code into a compatible MUSH or MUX.

MUSHCode for Simple Who

@create simple who
@lock simple who==me
&HEADER simple who=-@@-[center(simple who,70,-)]-@@-
&SECT simple who=[switch(1,[lt(%0,60)],{%0}s,[lt(%0,3600)],[div(%0,60)]m,[lt(%0,86400)],[div(%0,3600)]h,[div(%0,86400)]d)]
&EACH_ROW simple who=[ljust(name(%0),18)][rjust([u(sect,conn(%0))],4)] [rjust([u(sect,idle(%0))],4)] %b[ljust([left(get(%0/sex),8)],10)][u(getloc,%0)]
&GETLOC simple who=[ifelse(and(hasflag(loc(%0),unfindable),not(hasflag(%#,wizard))), s(v(PRIVATE)),ljust(name(loc(%0)),40))]
&TITLE simple who=Name[space(12)]On for%b%bIdle%b%bSex[space(5)]Location
&SIMPLEWHO simple who=$swho: @pemit %#=[s(v(header))]%r[s(v(title))]%r[repeat(-,78)] [iter(lwho(),%r[u(each_row,##)])]%r[s(v(total))]
&PRIVATE simple who=- ( player wishes privacy ) -
&TOTAL simple who=-@@-[repeat(-,45)][center(| [words(lwho())] players connected |,25,-)]-@@-
@Desc simple who=This is a very simple softcode who command (swho). It is crude and lacking a lot of nifty features and refinements, but should be easy for a novice coder to read through and upgrade as they see fit.
&CREDITS simple who=(c)2001 - nails@Gateway. this is crap. you heard it here first.
@set simple who=VISUAL
@set simple who=COMMANDS
@set simple who=!NO_COMMAND

swho