{ Conferencing server responses Version 0.02 - unreleased Last modified: 01-04-96 Written by G. Hiddink 30-03-96 replaced a few references to CHDAT by SIGNON... 25-03-96 if a server receives a CHREQ from a server, it should send a CHREQ back if the other server isn't already on the channel 13-03-96 if a server sees a channel in a CHLST it is interrested in, it should broadcast a CHREQ instead of unicasting one. This file tries to explain what a server B should do when it receives a message from server A. This includes what it should do when the message cannot be processed due to missing or inconsistent information. When is mentioned in an error reply, it stands for the message that caused the error. } CHREQ unknown to B: add to B's channel list A is already in the serverlist of : only send CHDATA /* just to make sure */ else: send SIGNON's for all users on server B unknown to A send CHDATA message to A with all users on server B A is not on the serverlist of : send CHREQ to A /* NOTE: the CHREQ message MUST be sent _after_ */ add A to the serverlist of /* the CHDATA message! */ CHREL unknown to B: add to channellist of B not in B's subscribed channellist: No action necessary else: remove A from serverlist of CHDATA () * unknown to B: send to A B not subscribed to : reply with CHREL for each : unknown to B: send CHDAT to A else: if not already at add with to channel notify users of B at of that event set channelmode to A is not yet in 's serverlist: add A to serverlist of send CHREQ to A CHINQ send CHLIST * to A, containing the channel list of B SRVLIST if this server doesn't know add it to the list of known channels if this server is interrested in for each serverid in the list if the server is not in the channel's serverlist send CHREQ to the server /* collect a destlist and use multicast */ else send CHREL to each serverid in the list /* the CHREQ is broadcast globally to regenerate routing tables */ CHLIST * for each channel in the message: if is unknown to B: add to channel list of B add to new_broadcastlist else: if the serverID of this server is smaller than the server sending the CHLIST start a sum SRVREQ algorithm for broadcast CHNEW new_broadcastlist /* received by broadcast */ CHNEW unknown to B: add to channel list of B is on B's subscription list and A is not in the serverlist of : send CHREQ to A add A to serverlist of else: no action necessary /* received by broadcast */ CHANANN unknown to B: add to channel list of B is on B's subscription list and A is not in the serverlist of : broadcast CHREQ else: no action necessary TOPIC unknown to B: send to A unknown to B: send to A not at : send to A else: change topic of into on behalf of notify users of B at of this event MODE unknown to B: send to A else: set mode of to notify users of B at of this event CHDIE unknown to B: no action necessary is on B's subscription list broadcast CHNEW else remove from B's channel list SIGNON already known to B: update if necessary else: add to B's user list, storing SIGNOFF unknown to B: no action necessary else remove from B's user list /* this is one of the messages for which no purpose is found yet. It seems to violate the statelessness of the protocol when it is used to get information for a /whois remotely. */ USRREQ ( ) * unknown to B: send to A else: send USRDATA to A /* this one is weird too. Dunno why I invented it. Could be handy some day; could be annoying... */ USRDATA ( ) * dunno what a server could possibly do with it; perhaps it could inform the user that requested the data. /* this one seems to interact with the previous one */ USRINQ send USRDATA () * to A /* dunno this one either; firstly, a seems necessary to preserve statelessness */ USRLIST ( ) * do something nice with the userlist JOIN unknown for server A at server B: send to server A unknown to B: send CHREL to server A add to channel list of B /* broadcast CHNEW? */ not on subscription list: send CHREL to server A else: construct from and A's ServerID already on with : no action necessary else: add to userlist of with mode notify users of B at of this event LEAVE unknown for server A at server B: no action necessary unknown to B: send CHREL to server A add to channel list of B not on subscription list: send CHREL to server A construct from and A's ServerID not known to B, or not at : no action necessary else: remove from userlist of notify users of B at of this event SAY unknown for server A at server B: send to A else: unknown to B: add to channellist of B not in B's subscribed channel list: send to A if no errors: construct from and A's ServerID not known to B: send to A else: not at : add to and notify local clients else: notify local users of B at of saying ACT do almost exactly the same as with SAY: notify users of doing MESG unknown for server A to B send to A unknown to B send to A else: send a private message , originating from INVITE unknown for server A to B: send to A unknown to B: send to A not in userlist of : add to userlist of notify users of B at of this event notify of the fact that (s)he is invited to by else: notify of the fact that (s)he is invited to by NICK unknown for server A to B: no action necessary? else: notify users of B at all channels in 's channel list of this event UNKNOWNCHAN is CHDATA () * : remove A from serverlist of is TOPIC : remove A from serverlist of is MODE : remove A from serverlist of UNKNOWNFROMUSER is MESG send SIGNON to A send to A is INV send to A send to A UNKNOWNTOUSER is MESG : notify of the fact that does not exist at A is INV : notify of the fact that does not exist at A UNKNOWNUSER is TOPIC : is unknown to B: no action necessary is unknown to B: no action necessary is not on : send LEAVE to A /* just to make sure */ else: send SIGNON to A send JOIN to A /* just to make sure */ send to A is JOIN : is unknown to B, or unknown to B, or user not on : no action necessary else: send SIGNON to A send to A is SAY : is unknown to B, or unknown to B: no action necessary is not on : send LEAVE to A /* just to make sure */ else: send SIGNON to A send JOIN to A send to A is CHDATA: is unknown to B, or unknown to B: no action necessary is not on : send LEAVE to A else send SIGNON to A send JOIN to A is USRREQ: dunno USERNOTATCHAN