🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.mail.mush
Article #27

Re: Testing for new messages

#27
From: Bart Schaefer
Date: Sat, 25 Jul 1992 03:22
38 lines
1520 bytes
On Jul 17, 12:52am, Lamont Granquist wrote:
} Subject: Testing for new messages
}
} This is pretty simple.  I'm using mush 7.2.2 and all I want to do is
} put something in my .mushrc file that says:
} 
} if <I have any new messages>  /* or <the last message is new> would work */
}   do such-and-such-crap.
} endif

You can't do that in .mushrc, because .mushrc is read before the folder
has been loaded.

What you can do is create another file (e.g., .mushfilter) and put in
it something like

    :n | set new
    if $?new
	do such-and-such-crap
    endif

And then read it by using:

    mush -F ~/.mushfilter

Mush will read your regular init files, then load the folder, then read
the .mushfilter file, and finally continue into the regularly scheduled
user interface.

You may wish to have the last line of .mushfilter be

    headers

because the -F option implies -N (no headers).

-- 
Bart Schaefer                                     schaefer@zigzag.z-code.com
Z-Code Software Corp.                             schaefer@z-code.com
Technical Details
Message-ID: <9207250322.AA26480@zigzag.zipcode.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!ucbvax!bloom-beacon!INTERNET!dont-send-mail-to-path-lines

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!ucbvax!bloom-beacon!INTERNET!dont-send-mail-to-path-lines
From: bart@zigzag.z-code.COM (Bart Schaefer)
Newsgroups: comp.mail.mush
Subject: Re: Testing for new messages
Message-ID: <9207250322.AA26480@zigzag.zipcode.com>
Date: 25 Jul 92 03:22:34 GMT
Sender: daemon@athena.mit.edu (Mr Background)
Reply-To: bart@zigzag.z-code.com
Organization: The Internet
Lines: 38