IRC Client


An IRC Client library

IRC objects:
irc-client


Chat objects:
irc-server-chat

irc-channel-chat

irc-nick-chat


Setup objects:
irc-profile


Words:
connect-irc ( irc-client -- )

terminate-irc ( irc-client -- )

attach-chat ( irc-chat irc-client -- )

detach-chat ( irc-chat -- )

hear ( irc-chat -- message )

speak ( message irc-chat -- )


IRC messages
Some of the RFC defined irc messages as objects:
irc-messagebase of all irc messages
rpl-welcomelogged in to server
pingping message
joinchannel join
partchannel part
quitquit from irc
privmsgprivate message (to client or channel)
kickkick from channel
rpl-nameslist of participants in channel
rpl-nickname-in-usechosen nick is in use by another client
noticenotice message
modemode change
unhandleduninmplemented/unhandled message


Special messages
Some special messages that are created by the library and not by the irc server.
irc-chat-endsent to a chat when it has been detached from the client, the chat should stop after it receives this message.
irc-end sent when the client isn't running anymore, the chat should stop after it receives this message.
irc-disconnected sent to notify chats that connection was lost.
irc-connected sent to notify chats that a connection with the irc server was established.


Example:
USING: irc.client irc.client.chats ; SYMBOL: bot SYMBOL: mychannel ! Create the profile and client objects "irc.libera.chat" irc-port "mybot123" f <irc-profile> <irc-client> bot set ! Connect to the server bot get connect-irc ! Create a channel chat "#mychannel123" <irc-channel-chat> mychannel set ! Register and start chat (this joins the channel) mychannel get bot get attach-chat ! Send a message to the channel "Hello World!" mychannel get speak ! Read a message from the channel mychannel get hear