home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 3 / TheARMClub_PDCD3.iso / programs / comms_networking / irclient / !IRClient / Scripts / Docs / Notes < prev    next >
Encoding:
Text File  |  1997-01-05  |  11.2 KB  |  237 lines

  1. New overload structure
  2. ======================
  3. To add features you should tie into the routines starting
  4.   PROCOverload_xxx
  5. These will be the main entry points for different types of
  6. calls. To pass the call on from an overloaded routine, use
  7.   PROC@(<params>).
  8. Other calls may be overloaded, but their use is NOT recommended - contact
  9. Gerph for a better interface.
  10.  
  11. Module structure
  12. ================
  13. This structure reduces the number of lines required to be added to the IRCLib
  14. script when new modules are written. You should almost always provide a
  15. FNOverload_ScriptInfo routine to provide a line of information about the
  16. script which is used by /ctcp <user> scripts.
  17.  
  18. The current overloading routines which you should be able to use are :
  19.   PROCInitialiseModule             : IRClient is starting - initialise vars
  20.   PROCConnecting                   : IRC is being connected, you will begin
  21.                                      to be called from here on so any vars which
  22.                                      may change should be reset here.
  23.   FNShutdownModule                 : This is called when IRC itself disconnects
  24.                                      and all IRC related modules should release
  25.                                      their sockets/memory. DCC, etc may continue
  26.                                      but control will only return to the user if
  27.                                      you set bit 0 of the flags.
  28.   PROCOverload_ScriptInfo          : Provide information about the script
  29.   PROCOverload_DisplaySelected     : A display has been clicked on (only ##)
  30.   PROCOverload_UserLine            : A line has been entered in an ## window
  31.   PROCOverload_UnknownCommand      : An unknown command has been entered in
  32.                                      a nick/chat window
  33.   FNOverload_AboutToSay            : We are about to say something
  34.  
  35.   
  36. 'On' overloads
  37. --------------
  38. These are similar to the mIRC 'ON' scripting functions and allow you to add
  39. features to particular events. Currently the following are supported :
  40.   PROCOverload_On_Join  : Someone joining a channel
  41.   PROCOverload_On_Part  : Someone leaving a channel
  42.   PROCOverload_On_Kick  : Someone being kicked from a channel
  43. * PROCOverload_On_Nick  : Someone changing their nick
  44. * PROCOverload_On_Quit  : Someone has quit IRC
  45.  
  46. * These routines will be called for each channel that the user is on
  47.  
  48.  
  49. CTCP Routines
  50. -------------
  51. The following routines are currently provided for extensions using CTCP :
  52.   PROCOverload_UnknownCTCPReply    : A reply to a ctcp that we sent
  53.   PROCOverload_UnknownCTCPRequest  : A request for ctcp from another nick
  54.   FNOverload_ListCTCP              : CLIENTINFO has been called - return
  55.                                      details about extra ctcp's
  56.   
  57. Configuration overloads
  58. -----------------------
  59. If a module is configurable it should also provide :
  60.   FNOverload_ConfigName       : Return the modules name
  61.   PROCOverload_ConfigOptions  : Display information about it
  62.   PROCOverload_ConfigCommand  : Process the users line
  63.  
  64. See the file Prog.ConfigLib for more details
  65.  
  66.  
  67. Notifying the user of events
  68. ----------------------------
  69. When you wish to notify the user of something there are 4 ways of doing this :
  70.   a) PROCNotify(mess$)
  71.      This is a short message which appears in a window in the middle of the
  72.      screen, disappearing after a period. Only use this for transient notes.
  73.      
  74.   b) PROCDisplayError(mess$,win$)
  75.      This will display, in red, a message in the window specified.
  76.      This should be used for dire warnings, such as being unable to open
  77.      important files, or being unable to connect to another machine.
  78.      
  79.   c) PROCDisplayWarning(mess$,win$)
  80.      This will display, in orange, a message in the window specified.
  81.      This should be used for most warnings which mean the operation could not
  82.      be performed for some reason. Error type warnings should be preceeded by
  83.      *** if they are intended for user windows. Syntax warnings should be
  84.      preceeded by a single *.
  85.      
  86.   d) PROCDisplayInfo(mess$,win$)
  87.      This will display, in white (maybe), a message in the window specified.
  88.      This should be used for informational messages which are not related to
  89.      the main text of the window. Most should be preceeded by a single *.
  90.   
  91. The latter three will have *** prepended to them /if/ :
  92.   1) the destination is not specified (ie win$="")
  93.   2) the first character of the string is not *
  94.  
  95. The reason for this is so that you can produce error messages in a different
  96. style in your own window. If you are sending a message to a variable window
  97. (ie it may be a channel, a chat or the current window) then you should
  98. include the *'s yourself; otherwise things will not look consistant.
  99.  
  100. There is a further means of displaying information, but this should be
  101. restricted to messages relating *directly* to things on IRC. This is
  102. PROCDisplayCTCP(mess$,win$) and this uses the CTCP colour specified in the
  103. configuration window. These messages will /always/ be preceeded by *** if
  104. they do not already contain them.
  105.  
  106.  
  107. Simple things
  108. -------------
  109. To put something in a window you should use PROCDisplay(message$,"",window$).
  110. To 'say' something to a window you should use PROCSay(message$,window$).
  111. To 'act' at a window you should use PROCAction(message$,window$).
  112. Sending directly to the server is by means of PROCSendToIRC(message$).
  113. To display things in IRC windows, eg chat/channel, use
  114.   PROCMessageToDisplay(message$,from$,to$). to$ may be prefixed by - for
  115.   notices.
  116.  
  117.  
  118. Notes on IRClient BASIC
  119. =======================
  120. (These are not critisisms, only reminders)
  121. IF's must be multi-line it seems
  122. Remember that WHEN <x>:<command> doesn't work, you fool Justin !
  123. No multiple commands per line in any way.
  124. FOR NEXT loops cannot change the variable value
  125. var$=$<address> now works but must be 0-terminated
  126. No % variables, everything is integers
  127. No dimensioned arrays - arrrgggghhhh !
  128. TIME$ doesn't work
  129. Can't leave lines with just : on them
  130. No ~ for printing Hex in STR$~<varname>
  131. Some things like comparisons will require brackets around them, like:
  132.   IF (!(<var>+<value>))=<value> THEN
  133.   otherwise they read as :
  134.   IF !((<var+value)=<value>) THEN
  135.   which gives !/?/$ operator out of range.
  136. No unary operations (I think you can't use -<varname> in certain circumstances)
  137. FNWildcardMatch is case sensitive
  138. Same variable assignment seems to fail - you can't do ret=!(ret+16)
  139. Functions in place of strings seems to fail sometimes :
  140.   SYS "something",0,FNOurHostName TO ,,ret
  141.   seems to fail, but I can't say why...
  142. Can't use binary, ie %10 doesn't work
  143.  
  144.  
  145. Old Magrathea features
  146. ======================
  147. These have been removed for various reasons :
  148. Version$=Version$+"<script name>" - use FNOverload_ScriptInfo
  149. Swapped the UnknownCTCPRequest overload's first two parameters - now from$,to$
  150.   as this seems more 'obvious'
  151.  
  152.  
  153. EXTREME WARNING
  154. ===============
  155. There would seem to be a bug in the EconetA driver (Blundell's) which causes
  156. it's part of the stack to die if the amount of data sent from one machine is
  157. greater than about 4k... This is a guideline figure and I've got around it by
  158. polling with IRServer in between displaying the motd, but this will cause
  159. problems with certain programs, eg http or smtp.
  160.  
  161.  
  162. Recent bugs in IRC (currently using 0.27)
  163. ==================
  164. The Scheduler module gave me endless headaches, 'cos I was determined to get
  165. it working sensibly so that I could test the FloodProt module. If we could
  166. have an interface which is similar to that it'd be nice - if not then I'm not
  167. bothered. It'd be nice though if you could keep the 'sorted' list of
  168. claimants so that they are alwasys called in the correct order.
  169.  
  170. I've yet to test the EVAL function :-(
  171.  
  172. Referencing things in MID$ off the end of the string seems to crash it :-(
  173.  
  174. PROCAddCallBack("string",FNStrdup(var$+" "+var$) dies - missing bracket, but
  175. gives error somewhere else...
  176.  
  177.  
  178. Christmasy type note
  179. ====================
  180. It's 25th December 1996 at 1:15 am and I'm all in the mood for programming...
  181. However if I don't go to bed now I'll never see Santa at 6:30 tomorrow so I
  182. shall leave IRClient at it's current state and hope that it'll wait for me
  183. until tomorrow... 17 scripts installed and still no real problems... says
  184. something really...
  185.  
  186.  
  187. 03 Jan 1997 type note
  188. =====================
  189. This is another BETA release. This release is intended to be so that people
  190. can give constructive comments on IRClient over the weekend whilst Matt is
  191. stopping with me. Matt will be here from about 1pm Saturday until erm... God
  192. knows when on Sunday (probably mid-evening, though I've not a clue really).
  193. I should expect that we will be popping on to IRC throughout the day to
  194. 'test' things and get peoples opinions. Could you either leave messages with
  195. Subetha or better still email us at Gerph@essex.ac.uk.
  196.  
  197. This might be the last release before a 'full' release in mid-January. If
  198. anybody wishes to write documentation for commands or even a complete module
  199. they are welcome to and it would be much appreciated. The idea is to build up
  200. a StrongHelp manual that can be updated as we go along so the format of any
  201. documentation should be :
  202.  
  203.   A stronghelp manual containing a directory with the same name as the module
  204. you are documenting (or Standard for the main module). Each / command should be documented in a data file within that named "/<command>". Any external
  205. references should be within the modules directory using _ to prefix the
  206. filename. Extensions to the /commands should be contained within a directory
  207. so you might have :
  208.   config./config.boolean
  209. except for the fact that boolean will probably need to be accessed from other
  210. modules easily and should probably be called config._boolean.
  211.   No files should be text files. This is not a 'lookupable' manual. Any
  212. programming work should be be contained within PROC or FN directories within
  213. the modules directory, eg config.PROC.Overload_ConfigCommand and any data structures or other related information should be in a data directory within the
  214. modules directory, eg http.data.listptr.
  215.   The author should leave his name and contact details in a file named author
  216. in the modules directory. If the author of the module and that of the manual
  217. are different then both MUST be included. This is a) to stop problems with
  218. the documentation hassling the original authors who may be unaware of the
  219. authorship and b) to make everyone famous. Anyone wishing to remain anonymous
  220. (fools !) may include my name as that of the author and I'll take the blame
  221. for it :-)
  222.  
  223. This structure may lead to quite long path names, but the idea is to remove
  224. the X-Files internal help system and revert to something much more useful in
  225. StrongHelp form. This can then be converted to HTML using the HTML encoder
  226. I've written. The structure will also allow easy updating as stronghelp manuals containing only the 'new' modules help can be distributed with the module and
  227. by simply copying (or having a program copy which is a later intent) the
  228. files from the new manual into the main manual it can be updated. A simple
  229. program such as those used in the Filetypes manual can then be used to build
  230. the index pages 'on the fly' or at update time.
  231.  
  232. I only invented the format this morning whilst lying in a very cold bath so
  233. it's very likely that there are some fundamental problems with it, but I
  234. don't forsee to many things that will make life difficult. I will collate all
  235. manuals I receive into one large 'stylised' manual so that things look
  236. consistant.
  237.