home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 3 / TheARMClub_PDCD3.iso / programs / comms_networking / irclient / !IRClient / Scripts / Modules / Notify (.txt) < prev   
Encoding:
RISC OS BBC BASIC V Source  |  1997-03-20  |  3.7 KB  |  167 lines

  1.  >NotifyLib
  2.  Manages notify lists 
  3.  Alex Howarth & Justin Fletcher
  4.  18 Jul 1996 - AH: Started                              v0.01-4
  5.  10 Aug 1996 - JF: Modified to use new init structure
  6.  15 Aug 1996 - JF: Removed the SelectNFL                v0.05
  7.  28 Sep 1996 - JF: Modified for new directory structure v0.06
  8.  0,"This is an IRClient script and cannot be run."
  9. InitialiseModule
  10. StartupStatus("Initialising Notify...")
  11. -notifylist$=magrathea_user$+".NotifyList"
  12.  Pass on to the next module
  13.  *********
  14.  Overloads
  15.  *********
  16.  Give ourselves a sensible name
  17. Overload_ScriptInfo(num)
  18.  ret$
  19.  num=0 
  20.   ret$="Notify v0.06 (Zarni)"
  21.  ret$=
  22. @(num-1)
  23.     =ret$
  24. Overload_UnknownCommand(command$,str$)
  25.  command$="NOTIFY" 
  26. DoNotify(str$)
  27. @(command$,str$)
  28.  *****************
  29.  Notify procedures
  30.  *****************
  31. DoNotify(str$)
  32.  in$,in,ison$,nick$,param$
  33. param$=
  34. oneparam(str$)
  35. str$=
  36. moveon(str$)
  37. param$,1) 
  38. checknotifylist
  39.  "?","*"
  40. shownotifylist
  41. 5"    
  42. alternotify(
  43. param$,2))
  44. 7"    
  45. alternotify(
  46. param$,2))
  47. alternotify(
  48. ,param$)
  49. checknotifylist
  50.  in,line$,ison$,nick$
  51. (notifylist$)
  52.  in<>0 
  53.     line$=
  54. line$,1)<>"#" 
  55. D       nick$=
  56. oneparam(line$)
  57.       line$=
  58. moveon(line$)
  59.       ison$=ison$+nick$+" "
  60. G        
  61.  line$="#END" 
  62. SendToIRC("ISON "+ison$)
  63. alternotify(add,frood$)
  64.  in,line$,nick$,inptr,outptr
  65.  frood$="" 
  66. DisplayWarning("Who do you want to add/delete from NOTIFY list ?","")
  67.   in=
  68. (notifylist$)
  69.  in<>0 
  70.  add 
  71.       
  72.         line$=
  73. X"        nick$=
  74. oneparam(line$)
  75. Y6        
  76. Capitalise(nick$)=
  77. Capitalise(frood$) 
  78.           add=
  79.         
  80.       
  81.  line$="#END"
  82.       
  83.  add 
  84.         
  85. #in-5
  86.         
  87. #in,frood$
  88.         
  89. #in,"#END"
  90.       
  91.       
  92. c>      
  93. DisplayInfo("* "+frood$+" added to notify list","")
  94. d        
  95.       inptr=0
  96.       outptr=0
  97.       
  98.         line$=
  99. i"        nick$=
  100. oneparam(line$)
  101.         inptr=
  102. k7        
  103. Capitalise(nick$)<>
  104. Capitalise(frood$) 
  105.           
  106. #in=outptr
  107.           
  108. #in,line$
  109.           outptr=
  110.           
  111. #in=inptr
  112.         
  113.       
  114.  line$="#END"
  115.       
  116. #in=outptr
  117.       
  118. tB      
  119. DisplayInfo("* "+frood$+" removed from notify list","")
  120. u        
  121.     out=
  122. (notifylist$)
  123. x,    
  124. #out,"# Notify list 
  125.  Alex Howarth"
  126. y)    
  127. #out,"# Comments start with a #"
  128. z5    
  129. #out,"# MUST contain an ending #END comment"
  130.  add 
  131.       
  132. #out,frood$
  133. }>      
  134. DisplayInfo("* "+frood$+" added to notify list","")
  135. ~        
  136. B      
  137. DisplayInfo("* "+frood$+" removed from notify list","")
  138.         
  139. #out,"#END"
  140.  "OS_File",18,notifylist$,&FFF
  141. shownotifylist
  142. KillDisplay("##NFL##")
  143. notifylist$=(notifylist$)
  144. (notifylist$)
  145. listcontent=
  146. titlebar=
  147.  in<>0 
  148.     line$=
  149. line$,1)<>"#" 
  150.       
  151.  titlebar=
  152. k        
  153. NewDisplay("##NFL##",50,"Contents of your NOTIFY list",DisplayFlag_NoIdent + DisplayFlag_NoCR)
  154. %        
  155. Display("","","##NFL##")
  156.         titlebar=
  157.       
  158.       listcontent=
  159. &      
  160. Display(line$,"","##NFL##")
  161.         
  162. line$,4)="#END"
  163.  in=0 
  164.  listcontent=
  165. DisplayWarning("Your NOTIFY list is empty","")
  166. DisplayWarning("Use /NOTIFY [+|-]<nick> to add or remove a user","")
  167.