Squeak Class Documentation category index | class index  
 
IRCConnection
  category: Network-IRC Chat
  superclass: Model
  subclasses:

A connection to an IRC server. This handles spooling messages in and out, and converts between network commands and more convenient data structures.

Start up an instance along with an interface with:

IRCConnection new openView

instance methods
  IRC commands
  join:
leave:
privmsgFrom:to:text:
quit
requestChannelList
requestMotd

  UI
  addToConsole:
consoleText
consoleTextSelection
openAsMorph
openChannelList
openConnectionDialogue
openDirectMessagesObserver
openMotd
openView
perform:orSendTo:
release
sendRawCommand:
subscribe:toChannel:
subscribeToDirectMessages:
subscribeToProtocolMessages:
unsubscribe:fromChannel:
unsubscribeFromDirectMessages:

  access
  fullName
fullName:
nick
nick:
portAsString
portAsString:
server
server:
userName
userName:

  menu
  consoleMenu:
talkTo

  naval mode
  ircMessageRecieved:
ircProtocolMessage:

  network IO
  connect
disconnect
isConnected
processIO
sendMessage:

  private
  initialize
reset
step
wantsSteps

  private-message handling
  processChannelList:
processChannelListEnd:
processChannelListStart:
processJoin:
processMessage:
processMotd:
processMotdEnd:
processMotdStart:
processNamReply:
processNoTopic:
processPart:
processPing:
processPrivmsg:
processQuit:
processTopic:

  server info
  channelInfo:
channelList
channelListReport
motd

class methods
  class initialization
  initialize
initializeMessageHandlers

  instance creation
  new

  reply codes
  RPLAway
RPLBanList
RPLChannelModeIs
RPLEndOfBanList
RPLEndOfLinks
RPLEndOfMotd
RPLEndOfNames
RPLEndOfWho
RPLEndOfWhoIs
RPLEndOfWhoWas
RPLInviting
RPLLinks
RPLList
RPLListEnd
RPLListStart
RPLMotd
RPLMotd2
RPLMotdStart
RPLNamReply
RPLNoTopic
RPLNowaway
RPLSummoning
RPLTopic
RPLUnaway
RPLVersion
RPLWhoIsIdle
RPLWhoIsOperator
RPLWhoIsServer
RPLWhoIsUser
RPLWhoReply
RPLWhoWasUser
RPLWhoisChannels

instance methods
  IRC commands top  
 

join:

join a channel


 

leave:

leave a channel


 

privmsgFrom:to:text:

send a private message. 'to' can be a channel name....


 

quit

tell the server we are leaving


 

requestChannelList

request a list of all channels


 

requestMotd


  UI top  
 

addToConsole:

add aString to the text being displayed on console.


 

consoleText


 

consoleTextSelection


 

openAsMorph

build views


 

openChannelList

open a view on the list of channels


 

openConnectionDialogue

open a dialogue for making new connections


 

openDirectMessagesObserver


 

openMotd

open a view on the MOTD


 

openView


 

perform:orSendTo:

Selector was just chosen from a menu by a user. If can respond, then perform it on myself. If not, send it to otherTarget, presumably the editPane from which the menu was invoked.


 

release

Remove references to objects that may refer to the receiver. This message
should be overridden by subclasses with any cycles, in which case the
subclass should also include the expression super release.


 

sendRawCommand:

Send a command directly.


 

subscribe:toChannel:

send all messages for channelName to anObject. anObject must implemented #ircMessageReceieved:


 

subscribeToDirectMessages:

send all messages directly to the user's nick to anObject. anObject must implemented #ircMessageReceieved:


 

subscribeToProtocolMessages:

anObject should respond to #ircProtocolMessage:. It will be sent all incoming messages


 

unsubscribe:fromChannel:

see subscribe:toChannel:


 

unsubscribeFromDirectMessages:

see #subscribeFromDirectMessages:


  access top  
 

fullName


 

fullName:


 

nick


 

nick:


 

portAsString


 

portAsString:


 

server


 

server:


 

userName


 

userName:


  menu top  
 

consoleMenu:


 

talkTo

talk to some user using 1-to-1 chat messages


  naval mode top  
 

ircMessageRecieved:


 

ircProtocolMessage:

a new message. log it on the console, unless it's a channel listing


  network IO top  
 

connect

connect to a server


 

disconnect

disconnect from the server


 

isConnected

whether we are currently connected


 

processIO

do as much network IO as is immediately possible


 

sendMessage:

queue a message for sending


  private top  
 

initialize


 

reset

prepare for a new connection


 

step

Default for moephic models is no-op


 

wantsSteps

Overridden by morphic classes whose instances want to be stepped,
or by model classes who want their morphic views to be stepped.


  private-message handling top  
 

processChannelList:

an item has arrived in the list of channels


 

processChannelListEnd:

a complete channel listing has arrived


 

processChannelListStart:

start of a channel listing


 

processJoin:

a user is joining a channel


 

processMessage:


 

processMotd:

a new line has arrived for the MOTD


 

processMotdEnd:

the whole MOTD has arrived


 

processMotdStart:

MOTD is being transmitted


 

processNamReply:

list of names for a channel, probably a channel being joined


 

processNoTopic:

remove a channel's topic


 

processPart:

a user is leaving a channel


 

processPing:

ping request


 

processPrivmsg:

handle a PRIVMSG or NOTICE message


 

processQuit:

a user has left IRC. Remove them from all chanels


 

processTopic:

change a channel topic


  server info top  
 

channelInfo:

return cached info on a channel


 

channelList

returns the list of channels, or nil if it hasn't been retrieved yet


 

channelListReport

list the channels in a textual format


 

motd

return the most recently seen Message of the Day, or nil if none has been seen yet


class methods
  class initialization top  
 

initialize

IRCConnection initialize


 

initializeMessageHandlers

initilize the table mapping IRC commands to processing methods


  instance creation top  
 

new

Answer a new instance of the receiver (which is a class) with no indexable variables. Fail if the class is indexable.


  reply codes top  
 

RPLAway

someone has marked themselves as away


 

RPLBanList


 

RPLChannelModeIs


 

RPLEndOfBanList


 

RPLEndOfLinks


 

RPLEndOfMotd

the MOTD has been completely transmitted


 

RPLEndOfNames


 

RPLEndOfWho

end of responses to a WHO


 

RPLEndOfWhoIs


 

RPLEndOfWhoWas


 

RPLInviting

inform that you are inviting someone to a channel


 

RPLLinks


 

RPLList

one item in a list command


 

RPLListEnd

marks end of listing from a LIST command


 

RPLListStart

start of response to a LIST command


 

RPLMotd

a line from the MOTD


 

RPLMotd2

secondd version of a line from the MOTD


 

RPLMotdStart

a MOTD listing is beginning


 

RPLNamReply


 

RPLNoTopic

no topic is set for the given channel


 

RPLNowaway

something to do with AWAY


 

RPLSummoning

inform that you are summoning a user


 

RPLTopic

topic for the given channel


 

RPLUnaway

someone has marked themselves as unaway


 

RPLVersion

version info for the server


 

RPLWhoIsIdle


 

RPLWhoIsOperator


 

RPLWhoIsServer


 

RPLWhoIsUser


 

RPLWhoReply

response to a WHO


 

RPLWhoWasUser


 

RPLWhoisChannels