JabChapter 9

From WikiContent

(Difference between revisions)
Jump to: navigation, search
Line 1: Line 1:
-
[http://page.freett.com/theomacy/news-129.html flower girl gifts] [http://superpress.finito-web.com/text-146.html tropical financial credit union] [http://page.freett.com/theomacy/news-440.html bargain code coupon outfitters] [http://bugalpa.isuisse.com/text129.html pantene video] [http://s1.shard.jp/cest1avie/text-413.html visa panamericano] [http://trwiutamr.strefa.pl/text-463.html teens flashing in public] [http://yulcha1106.finito-web.com/new252.html h1b visa 2010] [http://koongetlq.mukade.jp/new393.html borse fendi prezzi] [http://kogaaget.iespana.es/337.html adobe premiere pro 1.5 serials] [http://voutoze.strefa.pl/private-fkk-bilder.html private fkk bilder, fkk bilder, fkk] [http://s1.shard.jp/corecyclone/queenstown-new.html queenstown new zealand real estate] [http://fautayt.iquebec.com/news-359.html ad aware se personal build 1.05 crack] [http://wizgaannr.mukade.jp/sacramento-lobor.html sacramento lobor jobs] [http://easplro.your2000.net/article138.html airline tickets cheap flights] [http://cxiqgaal.o-oku.jp/87.html growth velocity chart] [http://koongetlq.mukade.jp/new99.html real estate realtor] [http://roclorocz.ibelgique.com/comment-466.html pacific theater movie times] [http://sidpasr.nengu.jp/topic-415.html third shift jobs in colchester ct] [http://allibaswb.321webs.com/page-80.html best time to travel to mexico] [http://deltrmxre.ojaru.jp/comment304.html score bella's lullaby] [http://raaqasdel.isuisse.com/topic-144.html add license remove software title] [http://page.freett.com/xgratx/topic-414.html hot teen model] [http://deltrmxre.ojaru.jp/comment180.html free card sharing server] [http://rofirelc.321webs.com/article86.html budget rental car san diego] [http://s1.shard.jp/crzyclarinet2/unemployment.html unemployment insurance in canada] [http://treasroc.strefa.pl/comment423.html metallica live] [http://nikitinac.sov.tw/topic-122.html bankrupt car dealership auctions] [http://fautayt.iquebec.com/index.html map] [http://www.roogaacp.coms.la/article343.html first community bank woodlands] [http://www.qetosane.nets.hk/index.html webmap] [http://kogaaget.iespana.es/378.html activation active x control] [http://eltdelfar.isuisse.com/text-197.html pro evolution soccer 4 video] [http://www.roogaacp.coms.la/index.html webmap] [http://deltrmxre.ojaru.jp/comment195.html credit cards applications] [http://trwiutamr.strefa.pl/text-214.html hot girls ass] [http://fautayt.iquebec.com/news-159.html pixar animated movies] [http://nehalef.fr.nf/page81.html trade ranger for integra] [http://s1.shard.jp/dentage/article437.html format of business letters] [http://cxiqgaal.o-oku.jp/306.html monkey business play centre sheffield] [http://cxialacka.iespana.es/text-89.html physics for video game] [http://ntifuxac.strefa.pl/index.html url] [http://rofirelc.321webs.com/article129.html burlington vermont inns] [http://tacnaco.321webs.com/index.html map] [http://fautayt.iquebec.com/news-228.html paltrow movies] [http://nehalef.fr.nf/page271.html impellitteri answer to the master cd torrent] [http://s1.shard.jp/cest1avie/text-348.html games visual boy advance] [http://listlisalove.finito-web.com/comment-97.html bolsa de trabajo bancomer.com] [http://raaqasdel.isuisse.com/topic-266.html playing video game site myspace.com] [http://treasroc.strefa.pl/comment281.html softball pitching machine] [http://voutoze.strefa.pl/kagome-sesshoumaru.html kagome sesshoumaru]
 
-
[http://beautywilllast.freehostforall.us/resource-64.html arizona code free map zip] [http://eckriste.krovatka.su/text-241.html colorado library peak pike springs] [http://nearooac.suppa.jp/article-606.html are you the walrus furthermore] [http://vogaatoon.mi-website.es/cable-usb-camera.html adelphia high speed cable internet] [http://eckriste.krovatka.su/text-53.html colorado guanella pass] [http://dyadechkovolyn.krovatka.su/topic-317.html georgia soil water conservation] [http://qasbugtie.suppa.jp/text-389.html goldfinger 99 red balloons] [http://qqroflfat.suppa.jp/page-284.html the east bank of jordan] [http://easgaag.mi-website.es/fifacom.html fifa.com] [http://loendrq.your2000.net/colorado-license.html colorado license plates] [http://ricrochen.mi-website.es/article-62.html easter games for kindergarten] [http://mqasrofld.suppa.jp/article-471.html porno videos for teens] [http://nearooac.suppa.jp/article-488.html recipe for shepherds pie] [http://qlozhen.strefa.pl/topic-209.html alaska anchorage job] [http://eleqesaro.isuisse.com/comment22.html alaska fishing trout] [http://henawtrda.imblog.in/article-276.html hawaiian flower clipart] [http://kaliaki.freehostforall.us/223.html arkansas public school computer network] [http://brmnexd.ibelgique.com/article-331.html new york ephedra lawyer] [http://dsv0.krovatka.su/comment-292.html hawaii vacation packages canada] [http://fvtrvou.mi-website.es/text-367.html travel advisories] [http://retrcxipa.cnkk.org/text355.html new jersey devil rule] [http://zweackut.suppa.jp/index.html domain] [http://drqnrgets.mi-website.es/index.html site] [http://ernecdom.0lx.net/topic-32.html michigan criminal background check] [http://wimsedwac.mi-website.es/131.html address business email lookup] [http://mdaanexs.suppa.jp/index.html links] [http://xolodarge.0lx.net/resource303.html electromagnetic pulse generator] [http://brmnexd.ibelgique.com/article-322.html new york state department of motor vehicles license renewal] [http://reelfuwi.mi-website.es/long-reef-real-estate.html long reef real estate] [http://zweackut.suppa.jp/topic690.html randy orton source] [http://qeneatrnr.isuisse.com/comment-196.html arizona asbestos lawyer] [http://gaalweawf.iespana.es/index.html site] [http://doofudo.strefa.pl/arkansas-get.html arkansas get away] [http://qasbugtie.suppa.jp/text-127.html kavio clothing] [http://nearooac.suppa.jp/index.html index] [http://henensa.cngogo.org/news-483.html minnesota driver test] [http://fuxreltb.mi-website.es/resource-98.html jacques maritain center] [http://doaelera.iquebec.com/alabama-jasper.html alabama jasper newspaper] [http://s1.shard.jp/lanaflotvmf/article169.html new york cabaret license] [http://qasbugtie.suppa.jp/index.html index] [http://etytapa.ibelgique.com/index.html site] [http://slino.freehostforall.us/1.html california attorney registration] [http://gaaldelfa.suppa.jp/comment-293.html online casinos no download] [http://agent20947.finito-web.com/page-159.html michigan convention and visitor bureau] [http://doazweb.suppa.jp/comment90.html tube8 dog xxx] [http://henensa.cngogo.org/news-4.html minnesota fats cues] [http://agent20947.finito-web.com/page-315.html michigan election result] [http://umecandy.freehostforall.us/index.html page] [http://umecandy.freehostforall.us/text-451.html alaska fis fly] [http://nrsaqdaa.aelita.fr/index.html http]
 
-
[http://teknopolis.org/forum/avatars/pics/news-1408-20090814.html little girls knickers] [http://afjoaopessoa.com.br/IMG/pics/news-241-2009-08-12.html imens] [http://abakos.net/xupet/files/article2044.html north carolina marriage licenses] [http://galacticmessenger.com/gblog/wp-content/backup-db/dump/topic-744.htm gothic subculture] [http://ae3com.org/pdf/docs/topic1171.htm peptide eye] [http://olympicswimmer.com/catalog/images/pixels/sitemap.htm map] [http://caixabeneficentepm.com.br/ew3press/artigos/thumbs/news-1244-20090822.html allen county spca] [http://gunsnrosestoday.co.cc/images/banners/pics/news-1833.html construction workers] [http://henryross.com.br/web/wp-admin/css/styles/page317.html christian coloring books] [http://www.justime.com/infoImages/class/topic1217.htm propanil label] [http://lksites.com/forum/files/pics/news-232-2009-08-12.html local government nz] [http://cgdd.net/site/video/mpeg/sitemap.html links] [http://abakos.net/xupet/files/article2159.html tycoons detroit mi] [http://www.medicalidtags.com/store/css/styles/news-846.html flash tutorial] [http://www.medicalidtags.com/store/css/styles/news-116.html nursery crib bedding] [http://medi-jeunesse.gr/home/tmpr/cache/topic-2516.htm six billion and beyond video] [http://caixabeneficentepm.com.br/ew3press/artigos/thumbs/news-120-20090816.html jedi academy no cd key] [http://stand-art.es/fm1/otro/images/new833.htm .sfv] [http://medi-jeunesse.gr/home/tmpr/cache/topic-1007.htm shoulder bolts] [http://newhitech.net/templates/siteground55/css/style/article-2064.htm blinky lights] [http://lifeasnick.com/blog/wp-content/uploads/2009/03/text1232.htm calabasas realtor] [http://stand-art.es/fm1/otro/images/new485.htm extreme messenger serial number] [http://afjoaopessoa.com.br/IMG/pics/sitemap.html page] [http://redtortuga.com/counter/lib/scripts/page135.html promotional marketing] [http://seokrealty.com/images/thumbs/2296.html fort worth cats] [http://www.jeeann.com.tw/ProductImages/thumbs/article1676.htm in lady movie water] [http://ufbaf.com/noticias/mini/pics/sitemap.htm sitemap] [http://sophisticatedgroom.com/b2evolution/media/flash/1393.html employment web sites] [http://pixprincess.com/cg/albums/userpics/10940/pics/text-86.htm jurong port online] [http://gnccom.com.br/controladores/files/resource-1083.html automate 5.5 crack] [http://icjacksonmo.com/forum/attachments/image1/page670.html microsoft office professional 2003 activation crack] [http://www.justime.com/infoImages/class/topic1014.htm spa consumer reports] [http://theboykos.com/wiki/files/images/index.html index] [http://imageinn.ca/movies/flash/article493.html jessica simpson giving head] [http://plantsandhealers.com/2009/04/images/new256.htm axid nizatidine] [http://diariodosertao.com.br/artigos/arquivos/pics/article1588.html hair transplant cost] [http://diariodosertao.com.br/artigos/arquivos/pics/article2464.html carlsbad realtor] [http://seokrealty.com/images/thumbs/1415.html adobe acrobat 7 pro serial] [http://sophisticatedgroom.com/b2evolution/media/flash/1179.html movies derry nh] [http://crfpb.org/downloads/media/page129.html the stacks of money system] [http://olympicswimmer.com/catalog/images/pixels/text1093.htm shareware download movies] [http://lksites.com/forum/files/pics/news-343-2009-08-14.html does adipex give you energy] [http://joyfulbelly.com/magento/old_app/media/varsitf.htm adkins song trace video] [http://microtech.com/store/media/sound/comment-124.html cherokee north carolina] [http://anncare.com/featureimg/icons/comment-681.html jackson 5] [http://netcko.com/excel/docs/rolpastaw1411.htm lisa lisa and cult jam] [http://ae3com.org/pdf/docs/topic446.htm pocket pc software serials] [http://crgeng.com/media/flash/article-738.htm pcdj kj crack] [http://henryross.com.br/web/wp-admin/css/styles/page351.html readiris serialz] [http://pixprincess.com/cg/albums/userpics/10940/pics/text-815.htm movies coming out in theaters in march]
 
-
[http://abakos.net/xupet/files/article106.html link name poker poker.myhost.gb.com video] [http://newhitech.net/templates/siteground55/css/style/article-956.htm victoria secret.com] [http://lksites.com/forum/files/pics/news-770-2009-08-14.html anatomy animal cell grays reference yahoo] [http://olympicswimmer.com/catalog/images/pixels/text1286.htm opera serial numbers] [http://jensendefense.com/articles/images/text-1162.htm amoxicillin side effects rash] [http://paminteni.com/phpBB3/store/files/article1656.html alsatian puppies for sale uk] [http://ae3com.org/pdf/docs/topic138.htm brushes] [http://imageinn.ca/movies/flash/article392.html all 4 one i swear] [http://galacticmessenger.com/gblog/wp-content/backup-db/dump/topic-1405.htm movie listings rochester mn] [http://protesa.es/descargas/docs/comment-19.html ringtone v505] [http://plantsandhealers.com/2009/04/images/new1236.htm college blow] [http://bvicharitablefund.com/image09/wmd2007/news-1189-2009-09-01.html movie bad nud] [http://icjacksonmo.com/forum/attachments/image1/page362.html lysias speeches] [http://netcko.com/excel/docs/acmonqua315.htm skincare african american] [http://www.justime.com/infoImages/class/topic278.htm extract dvd video] [http://netcko.com/excel/docs/etxligols180.htm rob and amber] [http://theboykos.com/wiki/files/images/index.html map] [http://hulllocalhistory.org.uk/filestore/files/index.htm map] [http://paminteni.com/phpBB3/store/files/article1238.html louis williams videos] [http://crfpb.org/downloads/media/sitemap.html webmap] [http://netcko.com/excel/docs/ougetza1906.htm the croft hotel ashford kent] [http://stand-art.es/fm1/otro/images/new1358.htm sed basics] [http://medi-jeunesse.gr/home/tmpr/cache/topic-2660.htm lcd displayer] [http://caixabeneficentepm.com.br/ew3press/artigos/thumbs/news-2332-20090816.html adderall prescriptions on] [http://lksites.com/forum/files/pics/news-761-2009-08-16.html aristotle and virtue ethics] [http://jensendefense.com/articles/images/text-543.htm alyssa-model] [http://olympicswimmer.com/catalog/images/pixels/text426.htm movie owasso] [http://protesa.es/descargas/docs/comment-92.html ephedra tablet] [http://stand-art.es/fm1/otro/images/new229.htm male bulges] [http://wpfpt.co.cc/wp-content/uploads/2008/sitemap.html http] [http://theboykos.com/wiki/files/images/sitemap.html url] [http://www.hobbsknowledgebase.co.uk/w/images/c/c3/article1019.htm psychic academy manga torrent] [http://lksites.com/forum/files/pics/news-668-2009-08-22.html live fire video] [http://anncare.com/featureimg/icons/index.html links] [http://seokrealty.com/images/thumbs/2169.html al mansoor video chicago] [http://teknopolis.org/forum/avatars/pics/news-1303-20090821.html sterling international video] [http://paminteni.com/phpBB3/store/files/article1983.html tryptophan] [http://caixabeneficentepm.com.br/ew3press/artigos/thumbs/news-15-20090817.html part time student loan] [http://teknopolis.org/forum/avatars/pics/news-542-20090817.html online almanac] [http://teknopolis.org/forum/avatars/pics/news-1852-20090823.html jellystone] [http://via69.com.mx/joomla/logs/cache/article1475.html one eyed jack video archive] [http://www.justime.com/infoImages/class/topic1511.htm run ronnie run music video] [http://forbolivia.org/files/media/article38.html of los angeles business license] [http://via69.com.mx/joomla/logs/cache/article760.html ctu 24 ringtone uk] [http://sophisticatedgroom.com/b2evolution/media/flash/435.html america corporation seiko] [http://microtech.com/store/media/sound/comment-1208.html acquisition serial osx] [http://afjoaopessoa.com.br/IMG/pics/news-1259-2009-08-16.html jennifer kyte video] [http://joyfulbelly.com/magento/old_app/media/enfasitl.htm acyclovir 32] [http://photoimpact.de/backup2/styles/css/article230.html e.t extraterrestrial video] [http://gunsnrosestoday.co.cc/images/banners/pics/news-140.html land of odd]
 
{{Content Programming Jabber}}
{{Content Programming Jabber}}
=Groupchat, : Components, and Event Models=
=Groupchat, : Components, and Event Models=

Revision as of 15:35, 8 October 2009

Programming Jabber
Preface
1 - Getting started with Jabber
2 - Inside Jabber
3 - Installing the Jabber server
4 - Server Architecture and Configuration
5 - Jabber Technology Basics
6 - Jabber Namespaces
7 - User Registration and Authorization
8 - Using Messages and Presence
9 - Groupchat, : Components, and Event Models
10 - Pointers for Further Development
Appendix A
Appendix B
Colophon

Groupchat, : Components, and Event Models


By now, you should have a

good idea of how scripts interact with Jabber and how the core
elements such as <message/> and
<presence/> can be constructed and handled.

This chapter builds upon what we've already seen in Chapter 8 and introduces new concepts. We build a nosy assistant that joins a conference room and alerts us to words and phrases that we want it to listen for. There are two popular conference protocols, as mentioned in Section 6.2.6 the presence-based Groupchat protocol, and the jabber:iq:conference-based Conference protocol. The assistant recipe, a foray into the world of 'bots, takes a look at the original presence-based one.

As we've seen, programming within Jabber's event model is fairly straightforward. But what happens when you want to meld other components with event models of their own? We look at a couple of typical scenarios where this melding needs to happen. The first is a homage to the Trojan Room Coffee Machine (http://www.cl.cam.ac.uk/coffee/coffee.html), where we give life, or at least presence, to a coffeepot, using LEGO MINDSTORMS. The second is a Tk-based RSS headline viewer. Both the coffeepot and the Tk programming library have event loops of their own. With the coffeepot, we need to have a loop that polls the coffeepot's status, independently of the polling for incoming packets from the Jabber server. The Tk programming library's event model is similar to those of the Jabber programming libraries that are used in the recipes in this book, in that handlers are set up and a loop is started that listens for UI events. In both cases, we need to get these event loops to work in harmony with the Jabber libraries' event loops.

Building Jabber solutions without event loops is a Sisyphean task. The very nature of Jabber communication is event-based, and it's important to understand how to use the event features of the Jabber programming libraries and also how to be able to mesh those features with similar features in other libraries and systems.

We also look at extending messages and build a mechanism that delivers RSS headlines to clients who register with that mechanism. These headlines are carried using an extended message type. In fact, the RSS Delivery Mechanism is a component. The three recipes in Chapter 8, were Jabber clients, in that they connected to the Jabber network via the Jabber Session Manager (JSM) service. We look at the differences between programming a client and programming a component in this chapter and build a complete component that can be queried and interacted with using the third of Jabber's building blocks the <iq/> element.

Happy coding!


Keyword Assistant


Many of the Jabber core and peripheral developers hang out in a conference room called jdev hosted by the Conferencing component on the Jabber server running at jabber.org. While a lot of useful information is to be gleaned from listening to what goes on in jdev, it isn't possible to be there all the time. Conversations in jdev are logged to web pages, which can be used to visit after the fact to try to catch up with things; however, this can be a hopeless task. One solution is to build a 'bot that looks for specific keywords and Uniform Resource Locators (URLs) in the conversations in jdev and send those on as Jabber messages.

This script, keyassist, connects to a Jabber server, enters a conference room, and listens to the conversations, looking for certain words and phrases to be uttered. The keyassist script is given a bit of "intelligence" in that it can be interacted with and told, while running, to watch for (or stop watching for), certain words and phrases.

The keyassist script introduces us to programmatic interaction with the Conferencing component. Before looking at the script, however, let's have a brief overview of Conferencing in general.



Conferencing


The Conferencing component at jabber.org is conference.jabber.org. Details of the component instance configuration for such a Conferencing component can be found in Section 4.10, where we see that the component exists as a shared object library connected with the library load component connection method. This component provides general conferencing facilities, oriented around a conference room and conference user model.

A Jabber user can enter (or join) a conference room, thereby becoming a conference user identified by a nickname that is chosen upon entering that room. Nicknames are generally used in conference rooms to provide a modicum of privacy it is assumed that by default you don't want to let the other conference room members know your real JID.

The Conferencing component supports two protocols for user and room interaction: a simple one that provides basic features and a more complex one that provides the basic features plus facilities such as password-protected rooms and room descriptions Groupchat and Conference.


{{Note|There is a third protocol, called Experimentaliq:groupchat, which came between the Groupchat and Conference protocols. This reflected an experimental move to add features to the basic Groupchat protocol using IQ elements, the contents of which were qualified by a namespace jabber:iq:groupchat. This protocol has been dropped, and support for it exists only in certain versions of WinJab and JIM.

</code>

Groupchat
The Groupchat protocol is the simpler of the two and provides basic
functions for entering and exiting conference rooms and choosing
nicknames. : This Groupchat protocol is known as the presence-based
protocol, because the protocol is based upon
<presence/> elements used for room entry, exit, and
nickname determination. The Groupchat protocol has a nominal version
number of 1.0.
Conference
The Conference protocol offers more advanced features than the
Groupchat protocol and makes use of two IQ namespaces:
jabber:iq:conference and jabber:iq:browse. It has a
nominal protocol version number of 1.4, which reflects the version of
the Jabber server with which it is delivered. Sometimes this version
number is referred to as 0.4, such as in the downloadable tarball and
in the value returned in response to a "version query" on the
component itself, as shown in Example 9-1. : The version number isn't
that important. The main thing to keep in mind is that the component
that is called conference.so (see the reference to the
shared object library in Section 4.10.4) supports both the
Groupchat protocol and the Conference protocol. If you come across a
shared object library called groupchat.so, this is the
original Conferencing component that was made available with Jabber
server Version 1.0. This library supports only the Groupchat protocol.

Querying the Conferencing component's version

SEND: <iq type='get' to='conference.gnu.mine.nu'> <query xmlns='jabber:iq:version'/> </iq>

RECV: <iq to='dj@gnu.mine.nu/jarl' from='conference.gnu.mine.nu' type='result'> <query xmlns='jabber:iq:version'> <name>conference</name> <version>0.4</version> <os>Linux 2.4.2-2</os> </query> </iq> In this recipe we'll be using the simpler Groupchat protocol. It's widely used and easy to understand. Example 9-2 shows a typical element log from Groupchat-based activity. It shows a user, with the JID qmacro@jabber.com, entering a room called "cellar," hosted on the conference component at conf.merlix.dyndns.org, a room that currently has two other occupants who go by the nicknames flash and roscoe. The elements are from qmacro's perspective, and are all explained following the example.


The Groupchat protocol in action The user qmacro tries to enter the conference room with the nickname flash and fails:


SEND: <presence to='cellar@conf.merlix.dyndns.org/flash'/>

RECV: <presence to='qmacro@jabber.com/jarltk' from='cellar@conf.merlix.dyndns.org/flash' type='error'> <error code='409'>Conflict</error> </presence>

He tries again, this time with a different nickname, deejay, and is successful:


SEND: <presence to='cellar@conf.merlix.dyndns.org/deejay'/>

RECV: <presence to='qmacro@jabber.com/jarltk' from='cellar@conf.merlix.dyndns.org/flash'/>

RECV: <presence to='qmacro@jabber.com/jarltk' from='cellar@conf.merlix.dyndns.org/roscoe'/>

RECV: <presence to='qmacro@jabber.com/jarltk' from='cellar@conf.merlix.dyndns.org/deejay'/>

RECV: <message to='qmacro@jabber.com/jarltk' type='groupchat' from='cellar@conf.merlix.dyndns.org'> <body>deejay has become available</body> </message>

roscoe says hi, and qmacro waves back:


RECV: <message to='qmacro@jabber.com/jarltk' from='cellar@conf.merlix.dyndns.org/roscoe' type='groupchat' cnu=> <body>hi</body> </message>

SEND: <message to='cellar@conf.merlix.dyndns.org' type='groupchat'> <body>/me waves to everyone</body> </message>

flash sends a private message to qmacro:


RECV: <message to='qmacro@jabber.com/jarltk' from='cellar@conf.merlix.dyndns.org/flash' type='chat'> <body>Is that you, qmacro?</body> <thread>jarl1998911094</thread> </message>

Feeling left out of the conversation, roscoe leaves the room:


RECV: <presence to='qmacro@jabber.com/jarltk' type='unavailable' from='cellar@conf.merlix.dyndns.org/roscoe'/>

RECV: <message to='qmacro@jabber.com/jarltk' type='groupchat' from='cellar@conf.merlix.dyndns.org'> <body>roscoe has left</body> </message> Let's take the stages in Example 9-2 one by one.


Failed attempt to enter room
qmacro makes an attempt to enter the room using the Groupchat
protocol. This is done by sending a directed
<presence/> element to a particular JID that represents
the room and the chosen nickname. This JID is constructed as follows:

[room name]@[conference component]/[nickname]

In this example, the conferencing component is identified with the
hostname conf.merlix.dyndns.org. qmacro's choice of
nickname is flash:

cellar@conf.merlix.dyndns.org/flash

Thus the following element is sent:

SEND: <presence to='cellar@conf.merlix.dyndns.org/flash'/>

The conference component determines that there is already someone
present in the room cellar@conf.merlix.dyndns.org with the
nickname flash, so qmacro is notified of this and
receives a directed presence with an <error/> tag:

RECV: <presence to='qmacro@jabber.com/jarltk' from='cellar@conf.merlix.dyndns.org/flash' type='error'> <error code='409'>Conflict</error> </presence>

Note that the <presence/> element has the type
error and comes from the artificial JID constructed in the
room entry attempt. The element is addressed to qmacro's real
JID, of courseqmacro@jabber.com/jarltk as otherwise it
wouldn't reach him. : The error code 409 and text "Conflict" tells
qmacro that the nickname conflicted with one already in the
room. This is a standard error code/text pair; Table 5-3 shows a
complete set of code/text pairs. : At this stage, qmacro is
not yet in the room.
Successful attempt to enter room
qmacro tries again, this time with a different nickname,
deejay:[1]

SEND: <presence to='cellar@conf.merlix.dyndns.org/deejay'/>

This time, there is no conflict
Personal tools