[JDEV] About chatrooms over Jabber
Waster_
waster at iname.com
Sat Sep 4 17:41:47 CDT 1999
I was thinking to send this message to [JDEV] when I return from
holiday, but as I see that there seems some work to make Jabber
"chattable",
I sent it like this. Maybe we can make this a part of standart Jabber
protocol.
The "JChat Bot" is working and fully functional now, but the PING
stuff
hasn't finished yet. If we cannot make something like this a part of
standart
protocol, I'll try to put the JChat server inside zABBER, with changing
tags
(split them to jchat_server and jchat_client), because I don't think
making
clients specific to a bot/transport is a good idea in Jabber.
P.S: I can send the "BOT" (in Tcl) if anyone mails to me.
P.S#2: If I had to place JChat server inside zABBER, then another mail
will be
sent to [JDEV] subjected "A message type with no back-error" :))
Thanks,
Kerem 'Waster_' HADIMLI
>
> I'm working on a JChat "Bot" these days. It'll connect to
> jabber.transport
> as a client and wait for messages (ext). With the special commands in
> <jchat>
> tag under <ext>, it will create chatrooms, handle the people joining it,
> inviting people, etc....
>
> The protocol is very simple, here's the all protocol:
>
> #From alican at JABBER to JChat at JABBER, client wants to create a new room:
> <message>
> <from nick="CanAli">alican at JABBER</from>
> <ext>
> <jchat command="create"/>
> </ext>
> </message>
>
> #From JChat at JABBER to alican at JABBER, JChat says "ok" and sends the name
> of the room in thread:
> <message>
> <from>JChat at JABBER</from>
> <thread>3145</thread>
> <ext>
> <jchat command="newroom"/>
> </ext>
> </message>
>
> #From alican at JABBER to JChat at JABBER, client wants to invite jenny at JABBER
> to the room:
> <message>
> <from nick="CanAli">alican at JABBER</from>
> <thread>3145</thread>
> <ext>
> <jchat command="invite" nick="jennifer">jenny at JABBER</jchat>
> </ext>
> </message>
>
> #From JChat at JABBER to jenny at JABBER, JChat invites jenny at JABBER to the
> room, and adds her to the room's invite-list:
> <message>
> <from>JChat at JABBER</from>
> <thread>3145</thread>
> <ext>
> <jchat command="invite" nick="CanAli">alican at JABBER</jchat>
> </ext>
> </message>
>
> #From jenny at JABBER to JChat at JABBER, jenny wants to join room. JChat
> deletes her from room's invite list:
> <message>
> <from nick="jennifer">jenny at JABBER</from>
> <thread>3145</thread>
> <ext>
> <jchat command="join"/>
> </ext>
> </message>
>
> #From JChat at JABBER to alican at JABBER, JChat at JABBER notifies him that
> jenny at JABBER is connected:
> <message>
> <from>JChat at JABBER</from>
> <thread>3145</thread>
> <ext>
> <jchat command="join" nick="jennifer">jenny at JABBER</jchat>
> </ext>
> </message>
>
> #From alican at JABBER to JChat at JABBER, he "says" something in the room:
> <message>
> <from nick="CanAli">alican at JABBER</from>
> <thread>3145</thread>
> <ext>
> <jchat command="say">something</jchat>
> </ext>
> </message>
>
> #From jenny at JABBER to JChat at JABBER, she "parts" from room. No reply is
> sent from JChat at JABBER:
> <message>
> <from nick="jennifer">jenny at JABBER</from>
> <thread>3145</thread>
> <ext>
> <jchat command="part">reason</jchat>
> </ext>
> </message>
>
> #From JChat at JABBER to alican at JABBER, says jenny at JABBER parted from room:
> <message>
> <from>JChat at JABBER</from
> <thread>3145</thread>
> <ext>
> <jchat command="part" nick="jennifer">jenny at JABBER</jchat>
> </ext>
> </message>
>
> Seems simple, huh? There're only 5 commands from client2JChat
> (create,invite,join,say,part)
> and 5 commands from JChat2client (newroom,invite,join,say,part).
>
> But how will JChat understand to "part" a client when disconnected?
> Will it use roster? Of course
> not. Because of the authorization stuff that can be added at one time, I
> prefer the "PING" method
> used on IRC. JChat will only ping clients that are talking on it, (this
> means that, if a client
> is in 10 rooms, JChat will not ping it 10 times for each room, it'll
> ping users without specifying
> roomname). If no "PONG" is received after 180 seconds, it'll part the
> client from all rooms with
> the reason "Ping Timeout".
>
> Here's a sample:
> #PING message from JChat to alican at JABBER:
> <message>
> <from>JChat at JABBER<from>
> <ext>
> <jchat command="PING">asdk</jchat>
> </ext>
> </message>
>
> #PONG reply from alican at JABBER to JChat (note that the text that is
> between the <jchat> tags are sent without modifying):
> <message>
> <from nick="CanAli">alican at JABBER</from>
> <ext>
> <jchat command="PONG">asdk</jchat>
> </ext>
> </message>
>
More information about the JDev
mailing list