home *** CD-ROM | disk | FTP | other *** search
- /* This procedure checks to see if any of the bulletins have been updated
- since the user last called */
-
- BullCheck: Procedure
- cls
- /* directory to the bulletins */
- bulletindir = 'bbs:bulletin/' /* put path to your bulletins directory here */
- NoofBulls = 12 /* Here, put the total number of bulletins you have */
- /* now fill in the actual file names of the bulletins (in the correct order
- as you have them listed in your bulletin.cfg file */
- bull.1 = 'policies'
- bull.2 = 'bbs_listing'
- bull.3 = 'user_poll'
- bull.4 = 'scores1.txt'
- bull.5 = 'GiTAris.top'
- bull.6 = 'scores17b.txt'
- bull.7 = 'top-downloaders'
- bull.8 = 'top-uploaders'
- bull.9 = 'top-message-leavers'
- bull.10 = 'top-callers'
- bull.11 = 'sewinners'
- bull.12 = 'regbbs.txt'
- /* Here put the names of the bulletins that you have have listed in your
- bulletin.cmds file */
- bullname1 = '1. Rules'
- bullname2 = '2. Moose Jaw BBS Listing'
- bullname3 = '3. User Poll'
- bullname4 = '4. Space Empire scores'
- bullname5 = '5. GiTAris Top Ten'
- bullname6 = '6. SE 1.7b scores'
- bullname7 = '7. Top Leaches'
- bullname8 = '8. Top Uploaders'
- bullname9 = '9. Top Message Leavers'
- bullname10 = '0. Top Callers'
- bullname11 = 'L. Lords of the Galaxy'
- bullname12 = 'B. Regina BBS List'
-
- BCversion = 1.0
-
-
- /* check when the user was last on */
- userinfo 'f'
- userday = LEFT(result,2)
- usermonth = CENTRE(result,3)
- if usermonth='Jan' then usermonth=01
- if usermonth='Feb' then usermonth=02
- if usermonth='Mar' then usermonth=03
- if usermonth='Apr' then usermonth=04
- if usermonth='May' then usermonth=05
- if usermonth='Jun' then usermonth=06
- if usermonth='Jul' then usermonth=07
- if usermonth='Aug' then usermonth=08
- if usermonth='Sep' then usermonth=09
- if usermonth='Oct' then usermonth=10
- if usermonth='Nov' then usermonth=11
- if usermonth='Dec' then usermonth=12
-
-
- StartMonth = 5112 /* This is the # of days from 1978 to Dec.31, 1991 */
- /* i.e. Dec. 31, 1991 is 5113 days since sometime in 1978 */
-
- transmit 'Bulletin Check, written by Todd Courtnage'
- transmit 'Version' BCversion'. Released on Mar. 6, 1992'
- transmit
- transmit 'The following bulletins have been updated/added since your last'
- transmit 'call to the BBS. Please read these bulletins, as they may'
- transmit 'contain very important, life and death material!!!!'
- transmit
-
- /* The variables in the following mean:
- d - the number of days that have elapsed since 1978 (sometime in 1978)
- and when the bulletin has been changed.
- Totalday - the total number of days that have elapsed since Jan. 1, 1992
- and when the bulletin has been changed
- Startmonth - this (as defined above) is the number of days between sometime
- in 1978 and Dec. 31, 1991 (note that this program will
- only work for this year ... I'm slowly learning ARexx, so
- a new version will come out that will make it work anytime)
- bullmonth - the month that the bulletin was last changed
- bullday - the date (i.e. the day number) that the bulletin was last changed
- usermonth - the month the user last logged on
- userday - the date the user last logged on
- temp - just a counter */
-
- DO temp = 1 TO noofbulls
- PARSE VALUE STATEF(bulletindir||bull.temp) WITH . . . . d . . .
- Totalday = d-startmonth
- call DAYTOMONTH
-
- IF bullmonth > usermonth THEN
- CALL PrintStuff
- ELSE IF bullmonth = usermonth THEN
- IF bullday => userday THEN
- CALL PrintStuff
- END
-
-
- CONTINUE
- RETURN
-
- PRINTSTUFF: Procedure expose temp bullname1 bullname2 bullname3 bullname4 bullname5 bullname6 bullname7 bullname8 bullname9 bullname10 bullname11 bullname12
- IF temp = 1 THEN
- transmit bullname1
- If temp = 2 THEN
- transmit bullname2
- IF temp = 3 THEN
- transmit bullname3
- IF temp = 4 THEN
- transmit bullname4
- IF temp = 5 THEN
- transmit bullname5
- IF temp = 6 THEN
- transmit bullname6
- IF temp = 7 THEN
- transmit bullname7
- IF temp = 8 THEN
- transmit bullname8
- IF temp = 9 THEN
- transmit bullname9
- IF temp = 10 THEN
- transmit bullname10
- IF temp = 11 THEN
- transmit bullname11
- IF temp = 12 THEN
- transmit bullname12
-
- return
-
- /* this procedure will take any number of days from Jan. 1 and calculate
- which month it is in and the date of the month (very crude tho) */
-
- DAYTOMONTH: procedure expose Totalday bullday bullmonth
- IF Totalday<31 THEN DO
- bullmonth=01
- bullday=Totalday
- END
- ELSE IF Totalday<60 THEN DO
- bullmonth=02
- bullday=Totalday-31
- END
- ELSE IF Totalday<91 THEN DO
- bullmonth=03
- bullday=Totalday-60
- END
- ELSE IF Totalday<121 THEN DO
- bullmonth=04
- bullday=Totalday-91
- END
- ELSE IF Totalday<152 THEN DO
- bullmonth=05
- bullday=Totalday-121
- END
- ELSE IF Totalday<182 THEN DO
- bullmonth=06
- bullday=Totalday-152
- END
- ELSE IF Totalday<213 THEN DO
- bullmonth=07
- bullday=Totalday-182
- END
- ELSE IF Totalday<244 THEN DO
- bullmonth=08
- bullday=Totalday-213
- END
- ELSE IF Totalday<274 THEN DO
- bullmonth=09
- bullday=Totalday-213
- END
- ELSE IF Totalday<305 THEN DO
- bullmonth=10
- bullday=Totalday-274
- END
- ELSE IF Totalday<335 THEN DO
- bullmonth=11
- bullday=Totalday-305
- END
- ELSE IF Totalday<366 THEN DO
- bullmonth=12
- bullday=Totalday-335
- END
-
- return
-
-
-
-