home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 3 / TheARMClub_PDCD3.iso / hensa / internet / irc_2 / Internet / SendIRC / Docs / Adding2IRC next >
Text File  |  1996-01-14  |  1KB  |  45 lines

  1. +----------------------------------------+
  2. |  !IRClient © 1995/6 Matthew Godbolt    |
  3. |  Please see file 'License' for         |
  4. |  important details about this program  |
  5. +----------------------------------------+
  6.  
  7. Adding to the functionality of IRClient.
  8.  
  9. Currently, IRClient supports two (unregistered with Acorn) WIMP messages.  In the near future it may very well support more, in a two-way communication protocol.
  10.  
  11. - IRC_SendData (&dab00)
  12.  
  13. Message block as per normal, text from Block+20 taken as a command and interpretted as if it had been typed in.  This should be broadcasted.
  14. The block should be zero-terminated.
  15.  
  16. - IRC_SendRawData (&dab01)
  17.  
  18. As above, except the data from Block+20 is taken to be a zero-terminated message to be passed directly to the IRC server.  This obviously needs the knowledge of the IRC protocol.
  19.  
  20.  
  21.  
  22. Examples:
  23.  
  24. DEF PROCIRC_SendData(message$,raw%)
  25.   DIM block% 256
  26.   block%!0     = 20+LENmessage$
  27.   block%!4     = 0
  28.   block%!8     = 0
  29.   block%!12    = 0
  30.   IF raw% THEN
  31.     block%!16  = &dab01
  32.   ELSE
  33.     block%16   = &dab00
  34.   ENDIF
  35.   $(block%+20) = message$+CHR$0
  36.   SYS "Wimp_SendMessage",17,block%,0,0
  37. ENDPROC
  38.  
  39. REM To join a channel
  40. PROCIRC_SendData("/JOIN #acorn",FALSE)
  41.  
  42. REM To do something more complex
  43. PROCIRC_SendData("PRIVMSG #acorn :"+CHR$1+"ECHO :Hello and welcome to the beginning of the film"+CHR$1,TRUE)
  44.  
  45.