home *** CD-ROM | disk | FTP | other *** search
RISC OS BBC BASIC V Source | 1997-03-20 | 3.7 KB | 167 lines |
- >NotifyLib
- Manages notify lists
- Alex Howarth & Justin Fletcher
- 18 Jul 1996 - AH: Started v0.01-4
- 10 Aug 1996 - JF: Modified to use new init structure
- 15 Aug 1996 - JF: Removed the SelectNFL v0.05
- 28 Sep 1996 - JF: Modified for new directory structure v0.06
- 0,"This is an IRClient script and cannot be run."
- InitialiseModule
- StartupStatus("Initialising Notify...")
- -notifylist$=magrathea_user$+".NotifyList"
- Pass on to the next module
- *********
- Overloads
- *********
- Give ourselves a sensible name
- Overload_ScriptInfo(num)
- ret$
- num=0
- ret$="Notify v0.06 (Zarni)"
- ret$=
- @(num-1)
- =ret$
- Overload_UnknownCommand(command$,str$)
- command$="NOTIFY"
- DoNotify(str$)
- @(command$,str$)
- *****************
- Notify procedures
- *****************
- DoNotify(str$)
- in$,in,ison$,nick$,param$
- param$=
- oneparam(str$)
- str$=
- moveon(str$)
- param$,1)
- checknotifylist
- "?","*"
- shownotifylist
- 5"
- alternotify(
- param$,2))
- 7"
- alternotify(
- param$,2))
- alternotify(
- ,param$)
- checknotifylist
- in,line$,ison$,nick$
- (notifylist$)
- in<>0
- line$=
- line$,1)<>"#"
- D nick$=
- oneparam(line$)
- line$=
- moveon(line$)
- ison$=ison$+nick$+" "
- G
- line$="#END"
- SendToIRC("ISON "+ison$)
- alternotify(add,frood$)
- in,line$,nick$,inptr,outptr
- frood$=""
- DisplayWarning("Who do you want to add/delete from NOTIFY list ?","")
- in=
- (notifylist$)
- in<>0
- add
-
- line$=
- X" nick$=
- oneparam(line$)
- Y6
- Capitalise(nick$)=
- Capitalise(frood$)
- add=
-
-
- line$="#END"
-
- add
-
- #in-5
-
- #in,frood$
-
- #in,"#END"
-
-
- c>
- DisplayInfo("* "+frood$+" added to notify list","")
- d
- inptr=0
- outptr=0
-
- line$=
- i" nick$=
- oneparam(line$)
- inptr=
- k7
- Capitalise(nick$)<>
- Capitalise(frood$)
-
- #in=outptr
-
- #in,line$
- outptr=
-
- #in=inptr
-
-
- line$="#END"
-
- #in=outptr
-
- tB
- DisplayInfo("* "+frood$+" removed from notify list","")
- u
- out=
- (notifylist$)
- x,
- #out,"# Notify list
- Alex Howarth"
- y)
- #out,"# Comments start with a #"
- z5
- #out,"# MUST contain an ending #END comment"
- add
-
- #out,frood$
- }>
- DisplayInfo("* "+frood$+" added to notify list","")
- ~
- B
- DisplayInfo("* "+frood$+" removed from notify list","")
-
- #out,"#END"
- "OS_File",18,notifylist$,&FFF
- shownotifylist
- KillDisplay("##NFL##")
- notifylist$=(notifylist$)
- (notifylist$)
- listcontent=
- titlebar=
- in<>0
- line$=
- line$,1)<>"#"
-
- titlebar=
- k
- NewDisplay("##NFL##",50,"Contents of your NOTIFY list",DisplayFlag_NoIdent + DisplayFlag_NoCR)
- %
- Display("","","##NFL##")
- titlebar=
-
- listcontent=
- &
- Display(line$,"","##NFL##")
-
- line$,4)="#END"
- in=0
- listcontent=
- DisplayWarning("Your NOTIFY list is empty","")
- DisplayWarning("Use /NOTIFY [+|-]<nick> to add or remove a user","")
-