board

std
OBJECT
	board


SYNOPSIS
	inherit "std/board";

        #include <news.h>
	#include <properties.h>


DESCRIPTION
        This is a generic newsboard. It provides the basic functionality
        for reading and writing notes into the news-system.
        Each board can carry one or more groups, accessible from players
        as well as from wizards.

        If the board carries several groups, one is used as 'default
        group' for users using the board the first time.

        Changing the group is remembered by the board for each user separately.
        If the user becomes non-interactive, it's data is removed.

        It is possible to write notes in parallel.

        Looking at the board also gives the list of notes in the current
        group.

        The commands implemented are:
         
           help board
         
         Displays a short help about the board.

           [board] list [<groupname> | notes]

         Lists all notes in the current group. If <groupname> is specified,
         the current group will be changed to it first.

           [board] list groups
  
         Lists the names of all groups on this board.

           [board] list rights [all]

         Tells the users rights in the current group (or in all groups).

           [board] group [<groupname>]
       
         Sets or displays the current group.

           [board] prev
 
         Goes to the previous group (the trash-group is skipped).

           [board] next
    
         Goes to the next group (the trash-group is skipped).
           
           [board] remove [[group] <groupname>] [note] <no>...
       
         Removes the <no>th's notes in the current group.
         If <groupname> is specified, the current group is changed to it 
         before.

           [board] read [[group] <groupname>] [note] <no>]
        
         Read the <no>th note in the current group.
         If <groupname> is specified, the current group is changed to it 
         before.
         For reading it uses /obj/lib/string::smore().

           [board] note <title>

         Write a new note with given <title> for the current group.
         During input, following commands are accepted:
           '**' , '.'  : ends input and posts the note.
           '~'  , '~q' : aborts input.
           '~r'        : redisplays the note so far.
           '~i <name>' : includes the given file (wiz only).
         Every line input (not included) is reformatted to a line length
         of 78 characters.
        
        If a board carries just one group, the commands 'group', 'prev'
        and 'next' are disabled. Also, any arg '[group] <groupname>' is
        illegal (except for 'list').


        Incarnation of the board is simple. It has the same properties
        that /std/thing has, plus a P_GROUPS property containing an
        array of all recognized groupname-patterns. The property
        is defined in /sys/news.h.

        The first of the set patterns is the default group.
        The patterns are treated as regular-expressions, but with the
        following changes: '.' matches itself, '\.' matches any character,
        and every pattern must be thought of being enclosed in '^','$'.

        string *SetGroups (mixed names)

          <names> may be a single string or an array of strings and is
          set as the content of P_GROUPS.
          Result is the new content of the property.

        When a QueryLong() is taken of the board, it responds with
        the set long-description and adds some board-specific information.

        If is not possible for a living to take the board.


INHERITANCE TREE
        board
          |-thing
	  |   |-thing/moving
	  |   |-thing/properties
	  |   `-thing/description
          `/obj/lib/string


SEE ALSO
	properties(C), regexp(E), thing(S)