/*
------------------------------------------------------------------------
                 Oves SommarHus BBS +46-(0)16-146837 
  $VER: MainMenu.Rexx 1.01 (27-06-96) Snille Of LoserKlubben.inc
------------------------------------------------------------------------
Description:  Displays a Main Menu in CNet 3.05

Requirements: CNet 3.05

Install:      If you want the menu to appere whenever a user go 
              back to main, just add this to all the following lines
              in BBSMenu:

              3; Main prompt
              after MOnitor command
              Menu				|#0PFiles:MainMenu/MainMenu.rexx}

              4; ud/base
              after DIR,Scan commands
              Quit, Main			|#0PFiles:MainMenu/MainMenu.rexx} 

              6; News/GFiles/PFiles
              after Goodbye, Off, LOGOFF commands
              Quit, Main			|#0PFiles:MainMenu/MainMenu.rexx}

              14; Bbslist
              after List,Scan commands
              Quit, Main			|#0PFiles:MainMenu/MainMenu.rexx}

              16; Conference
              after Room command
              Quit, Main			|#0PFiles:MainMenu/MainMenu.rexx}

              18; Vote
              after Kill command
              Quit, Main			|#0PFiles:MainMenu/MainMenu.rexx}

              Now make a MENU file in ANSI or MCI or whatever you want and
              config below...                                             

Mail me at:   E-Mail:
              erik.pettersson@mailbox.swipnet.se

              NetMail:
              Erik Pettersson 2:206/404.0 FidoNet
              Snille 137:466/102.0 wARPNet

------------------------------------------------------------------------
*/

options results ; signal on SYNTAX ; signal on ERROR ; signal on IOERR
tr=transmit ; se=sendstring ; gc=getchar ; gu=getuser ; gs=getscratch
a='rexxsupport.library' ; if ~show('l',a) then if ~addlib(a,0,-30) then exit

/* ---------------------------- Config Here -------------------------- */

pathmenu='CNet:SysText/Sys.MainMenu' /* Path and name of the menu      */
                                     /* ANSI or MCI file.              */

MCommand='M'                         /* Menu Command in main prompt    */
NOMenCom1='M!'                       /* If user puts a "!" after the   */
                                     /* Quit or Main command the menu  */
                                     /* don't appere.                  */
NOMenCom2='Q!'                       /* Same as abow but if you have   */
                                     /* more then one EXIT command     */

DefHelpL='2'                         /* Lowest level of help for       */
                                     /* automatic MENU show when       */
                                     /* entering MAIN PROMPT.          */

/* ------------------------------------------------------------------- */

GetUser 55 ; HLP=result
getuser 1307358 ; COM=upper(result)
IF Com=NOMenCom1 then exit
IF Com=NOMenCom2 then exit
if HLP <DefHelpL then do
	sendfile Pathmenu
	Exit
end
if COM=MCommand then sendfile Pathmenu
Exit

SYNTAX: ; ERROR: ; IOERR: ; er=rc' ('errortext(rc)') in line 'sigl
	getuser 1311992 ; a=result ; getuser 1311960 ; b=result ; c='"'a||b'"'
	er='Error Code 'er' of 'c ; transmit er ; logentry er ; bufferflush
Exit
