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.
- IRC_SendData (&dab00)
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.
The block should be zero-terminated.
- IRC_SendRawData (&dab01)
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.
Examples:
DEF PROCIRC_SendData(message$,raw%)
DIM block% 256
block%!0 = 20+LENmessage$
block%!4 = 0
block%!8 = 0
block%!12 = 0
IF raw% THEN
block%!16 = &dab01
ELSE
block%16 = &dab00
ENDIF
$(block%+20) = message$+CHR$0
SYS "Wimp_SendMessage",17,block%,0,0
ENDPROC
REM To join a channel
PROCIRC_SendData("/JOIN #acorn",FALSE)
REM To do something more complex
PROCIRC_SendData("PRIVMSG #acorn :"+CHR$1+"ECHO :Hello and welcome to the beginning of the film"+CHR$1,TRUE)